Commit 7684fe96 authored by 陈宗胤(贵阳日报)'s avatar 陈宗胤(贵阳日报)
parents 5f7741ec 1bb578e7
...@@ -7,6 +7,15 @@ ...@@ -7,6 +7,15 @@
:draggable="true" :draggable="true"
inactiveIcon="a-controlplatform" inactiveIcon="a-controlplatform"
> >
<!-- 助农总入口 -->
<view v-if="position === '0'" class="outer-view">
<view class="custom-button" @click="go('/pages/order/order')">
<image class="fab-icon" src="../../static/index/order.png"></image>
<text class="fab-text">订单</text>
</view>
</view>
<!-- 团购 -->
<view v-if="position === '1'" class="outer-view">
<view class="custom-button" @click="go('/pages/ticket/ticket')"> <view class="custom-button" @click="go('/pages/ticket/ticket')">
<image class="fab-icon" src="../../static/index/coupon.png"></image> <image class="fab-icon" src="../../static/index/coupon.png"></image>
<text class="fab-text">优惠券</text> <text class="fab-text">优惠券</text>
...@@ -15,10 +24,40 @@ ...@@ -15,10 +24,40 @@
<image class="fab-icon" src="../../static/index/order.png"></image> <image class="fab-icon" src="../../static/index/order.png"></image>
<text class="fab-text">订单</text> <text class="fab-text">订单</text>
</view> </view>
</view>
<!-- 预售主页 -->
<view v-if="position === '2'" class="outer-view">
<view class="custom-button" @click="go('/pages/order/order')">
<image class="fab-icon" src="../../static/index/order.png"></image>
<text class="fab-text">订单</text>
</view>
<view class="custom-button" @click="go('/pages/assistingAgriculture/cart/cart')">
<image class="fab-icon" src="../../static/index/gwc.png"></image>
<text class="fab-text">购物车</text>
</view>
</view>
<!-- 旅居主页 -->
<view v-if="position === '3'" class="outer-view">
<view class="custom-button" @click="go('/pages/order/order')">
<image class="fab-icon" src="../../static/index/order.png"></image>
<text class="fab-text">订单</text>
</view>
</view>
</wd-fab> </wd-fab>
</template> </template>
<script setup> <script setup>
const props = defineProps({
// 悬浮按钮
position: {
type: String,
default: '1',
},
cartCount: {
type: Number,
default: 0,
},
});
// 前往个人中心 // 前往个人中心
const go = (url) => { const go = (url) => {
xma.navigateTo({ xma.navigateTo({
...@@ -28,6 +67,9 @@ const go = (url) => { ...@@ -28,6 +67,9 @@ const go = (url) => {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.outer-view {
display: flex;
}
.custom-button { .custom-button {
min-width: auto; min-width: auto;
box-sizing: border-box; box-sizing: border-box;
......
...@@ -40,3 +40,11 @@ export function screeningConditions(data) { ...@@ -40,3 +40,11 @@ export function screeningConditions(data) {
data, data,
}); });
} }
// 视频
export function streamList(data) {
return request({
url: `/sgyrdd/znprod/tour/streamList`,
method: 'GET',
data,
});
}
...@@ -174,7 +174,10 @@ ...@@ -174,7 +174,10 @@
{ {
"path": "pages/assistingAgriculture/detail/detail", "path": "pages/assistingAgriculture/detail/detail",
"style": { "style": {
"navigationBarTitleText": "详情页" "navigationBarTitleText": "商品详情",
"navigationBarBackgroundColor": "#ffffff",
"navigationStyle": "custom",
"onReachBottomDistance": 50,
} }
}, },
{ {
......
<template> <template>
<div class="route-details"> <div class="route-details">
<Search></Search> <Search :backgroundBox="backgroundBox"></Search>
<scroll-view class="container" scroll-y> <scroll-view class="container" scroll-y @scroll="onScroll">
<!-- <img class="back-img" src="/static/assistingAgriculture/assets/left.png" @tap="back" /> --> <!-- <img class="back-img" src="/static/assistingAgriculture/assets/left.png" @tap="back" /> -->
<!-- 轮播 --> <!-- 轮播 -->
<div class="banner"> <div class="banner">
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
<div class="date-wrap"> <div class="date-wrap">
<div class="date-title">选择日期</div> <div class="date-title">选择日期</div>
<div class="date-list flex-between"> <div class="date-list flex-between">
<div class="list"> <div class="list" style="margin-top: 20rpx">
<div <div
class="item" class="item"
:class="{ active: activePrice === v }" :class="{ active: activePrice === v }"
...@@ -328,9 +328,19 @@ import { ...@@ -328,9 +328,19 @@ import {
getItinerary, getItinerary,
getStoreInformation, getStoreInformation,
} from '@/api/assistingAgriculture/route'; } from '@/api/assistingAgriculture/route';
import { groupBuyConfirm, groupBuyUpdate } from '@/api/confirmOrder'; import { sgyOrderOrderInfo } from '@/api/assistingAgriculture/shop';
import { groupBuyConfirm, groupBuyUpdate, groupBuyCreate } from '@/api/confirmOrder';
import { getCollect } from '@/api/packageDetail'; import { getCollect } from '@/api/packageDetail';
/* 监听滑动改变顶部颜色 */
const backgroundBox = ref('');
const onScroll = (e) => {
const { scrollTop } = e.detail;
if (scrollTop > 20) {
backgroundBox.value = '#fff';
} else {
backgroundBox.value = '';
}
};
const swiperList = ref([ const swiperList = ref([
'https://registry.npmmirror.com/wot-design-uni-assets/*/files/redpanda.jpg', 'https://registry.npmmirror.com/wot-design-uni-assets/*/files/redpanda.jpg',
]); ]);
...@@ -344,12 +354,13 @@ const firstEvaluation = ref({}); ...@@ -344,12 +354,13 @@ const firstEvaluation = ref({});
const photoList = ref([]); const photoList = ref([]);
// 套餐列表 // 套餐列表
const mealList = ref([]); const mealList = ref([]);
const activeMeal = ref(null); const activeMeal = ref({});
const orderInfo = ref({}); const orderInfo = ref({});
const onActiveMeal = (item) => { const onActiveMeal = (item) => {
activeMeal.value = item; activeMeal.value = item;
getPriceListFn(item.mealId); getPriceListFn(item.mealId);
}; };
// 日历 // 日历
const priceList = ref([]); const priceList = ref([]);
const viewPriceList = ref([]); const viewPriceList = ref([]);
...@@ -363,6 +374,41 @@ watch(show, (value) => { ...@@ -363,6 +374,41 @@ watch(show, (value) => {
index = Math.min(priceList.value.length - 3, index); index = Math.min(priceList.value.length - 3, index);
viewPriceList.value = priceList.value.slice(index - 1, index + 3); viewPriceList.value = priceList.value.slice(index - 1, index + 3);
}); });
onShow(() => {
if (outTradeNos.value) {
// 查询订单状态决定是否支付
sgyOrderOrderInfo({ orderNumber: outTradeNos.value }).then((res) => {
switch (res.data.baseOrder.subStatus) {
case '1':
xma.showToast({
title: '支付失败',
icon: 'error',
duration: 1000,
success() {
setTimeout(() => {
xma.redirectTo({
url: `/pages/order/order?status=not_pay`,
});
}, 1500);
},
});
break;
case '2':
xma.redirectTo({
url: `/pages/order/detail?orderNumber=${outTradeNos.value}`,
});
break;
case '3':
xma.redirectTo({
url: `/pages/order/detail?orderNumber=${outTradeNos.value}`,
});
break;
default:
break;
}
});
}
});
const getWeek = (date) => { const getWeek = (date) => {
const week = ['日', '一', '二', '三', '四', '五', '六']; const week = ['日', '一', '二', '三', '四', '五', '六'];
return week[new Date(date).getDay()]; return week[new Date(date).getDay()];
...@@ -383,7 +429,7 @@ function jumpPage() { ...@@ -383,7 +429,7 @@ function jumpPage() {
} }
function groupBuyConfirmFn(prodId, skuId) { function groupBuyConfirmFn(prodId, skuId) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
groupBuyConfirm({ prodId, skuId }).then((res) => { groupBuyConfirm({ prodId, skuId, orderType: 'store' }).then((res) => {
if (res.code === 0) { if (res.code === 0) {
orderInfo.value = res.data; orderInfo.value = res.data;
resolve(res.data.shopId); resolve(res.data.shopId);
...@@ -418,33 +464,51 @@ function formatDate(inputDate) { ...@@ -418,33 +464,51 @@ function formatDate(inputDate) {
} }
const payNow = async (data) => { const payNow = async (data) => {
groupBuyConfirmFn(activeMeal.value.prodId, activeMeal.value.skuId).then((res) => { groupBuyConfirmFn(activeMeal.value.prodId, activeMeal.value.skuId).then((res) => {
groupBuyUpdateFnQg().then(() => {}); groupBuyUpdateFnQg().then(() => {
});
params.value.id = orderInfo.value.key;
params.value.tradeType = data.selectType;
params.value.basketIds = basketIds.value;
const qgParams = { const qgParams = {
id: orderInfo.value.key, id: orderInfo.value.key,
placeOrderWay: 'sgy', placeOrderWay: 'sgy',
payWayCode: 5, payWayCode: 5,
tradeType: data.selectType, tradeType: data.selectType,
}; };
// groupBuyCreate(qgParams).then((res) => { groupBuyCreate(qgParams).then((res) => {
// if (res.code === 0) { if (res.code === 0) {
// openUrl(res.data.result); openUrl(res.data.result);
// } else { } else {
// groupBuyConfirmFn(prodIds.value, skuIds.value); groupBuyConfirmFn(activeMeal.value.prodId, activeMeal.value.skuId);
// } }
// }); });
});
});
}; };
function groupBuyUpdateFnQg(couponUserId = '') { const outTradeNos = ref(null);
const openUrl = (result) => {
const { paymentUrl, outTradeNo } = result;
outTradeNos.value = outTradeNo;
window.location.href = paymentUrl;
// 设置一个延时器
const start = Date.now();
setTimeout(() => {
const end = Date.now();
if (end - start < 1200) {
// 如果 iframe 加载时间小于 1.2 秒,说明应用没有安装
xma.showToast({
title: '未安装App',
icon: 'error',
});
// 这里可以跳转到应用下载页面
}
}, 1600);
};
function groupBuyUpdateFnQg() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
groupBuyUpdate({ groupBuyUpdate({
key: orderInfo.value.key, key: orderInfo.value.key,
receiverTime: formatDate(activePrice.value.priceDay), receiverTime: activePrice.value.priceDay.replace(' ', '-'),
}).then((res) => { }).then((res) => {
if (res.code === 0) { if (res.code === 0) {
orderInfo.value = res.data; orderInfo.value = res.data;
resolve();
} }
}); });
}); });
......
...@@ -54,11 +54,23 @@ ...@@ -54,11 +54,23 @@
src="/static/assistingAgriculture/rural/dayTOur.png" src="/static/assistingAgriculture/rural/dayTOur.png"
style="width: 32rpx; height: 32rpx" style="width: 32rpx; height: 32rpx"
/> />
<img <video
class="spe-img" :class="{ 'no-progress-bar': !isFullScreen }"
src="/static/assistingAgriculture/rural/img5.png" :show-fullscreen-btn="true"
style="width: 306rpx; height: 204rpx" :show-play-btn="true"
/> :show-enter-play-btn="true"
class="spe-img1"
id="videoId"
:src="videoList[0].videoUrl"
@error="videoErrorCallback"
@play="play"
@fullscreenchange="handleFullscreenChange"
></video>
<!-- <img-->
<!-- class="spe-img"-->
<!-- src="/static/assistingAgriculture/rural/img5.png"-->
<!-- style="width: 306rpx; height: 204rpx"-->
<!-- />-->
</view> </view>
</view> </view>
<view class="hot-way"> <view class="hot-way">
...@@ -177,9 +189,10 @@ ...@@ -177,9 +189,10 @@
</view> </view>
</view> </view>
</view> </view>
<view v-if="!hasMoreData" class="no-more-data">没有更多了</view>
</view> </view>
</view> </view>
<fab /> <fab position="3" />
</view> </view>
</template> </template>
...@@ -189,14 +202,15 @@ import Sort from '../../../components/assistingAgriculture/index/Sort.vue'; ...@@ -189,14 +202,15 @@ import Sort from '../../../components/assistingAgriculture/index/Sort.vue';
import DepartureDate from '../../../components/assistingAgriculture/index/DepartureDate.vue'; import DepartureDate from '../../../components/assistingAgriculture/index/DepartureDate.vue';
import ScenicSpots from '../../../components/assistingAgriculture/index/ScenicSpots.vue'; import ScenicSpots from '../../../components/assistingAgriculture/index/ScenicSpots.vue';
import Screen from '../../../components/assistingAgriculture/index/Screen.vue'; import Screen from '../../../components/assistingAgriculture/index/Screen.vue';
import { getPopularList, getProdList, getTour } from '@/api/assistingAgriculture/village'; import {
getPopularList,
getProdList,
getTour,
streamList,
} from '@/api/assistingAgriculture/village';
import { getPresaleList } from '@/api/assistingAgriculture/building'; import { getPresaleList } from '@/api/assistingAgriculture/building';
import { onMounted, ref } from 'vue'; import { onMounted, ref } from 'vue';
import fab from '../../../components/fab/fab.vue'; import fab from '../../../components/fab/fab.vue';
onMounted(async () => {
getProd();
getPopular();
});
const rotate = ref(false); const rotate = ref(false);
const rotate2 = ref(false); const rotate2 = ref(false);
const rotate3 = ref(false); const rotate3 = ref(false);
...@@ -217,7 +231,8 @@ const scenicSpotsRef = ref(null); ...@@ -217,7 +231,8 @@ const scenicSpotsRef = ref(null);
const screenRef = ref(null); const screenRef = ref(null);
const backgroundBox = ref(''); const backgroundBox = ref('');
const border = ref(''); const border = ref('');
const videoList = ref([]);
const isFullScreen = ref(false);
const locationFiltering = (index) => { const locationFiltering = (index) => {
switch (index) { switch (index) {
case 0: case 0:
...@@ -254,6 +269,12 @@ const locationFiltering = (index) => { ...@@ -254,6 +269,12 @@ const locationFiltering = (index) => {
forPeopleList.value = []; forPeopleList.value = [];
} }
}; };
const videoContext = ref(null);
onMounted(async () => {
getProd();
getPopular();
getStreamList();
});
onPullDownRefresh(() => { onPullDownRefresh(() => {
keyword.value = ''; keyword.value = '';
getProd(); getProd();
...@@ -270,6 +291,37 @@ const getPopular = () => { ...@@ -270,6 +291,37 @@ const getPopular = () => {
popularRouterData.value = res.data.records; popularRouterData.value = res.data.records;
}); });
}; };
// 查询视频列表
const getStreamList = () => {
streamList().then((res) => {
res.data.forEach((item) => {
item.videoUrl = import.meta.env.VITE_APP_IMG_URL + '/pig/' + item.videoUrl;
});
videoList.value = res.data;
console.log(videoList.value, 121);
});
};
// 播放时进入全屏
function play(index) {
const videoContext = uni.createVideoContext('videoId');
videoContext.requestFullScreen();
}
// 退出全屏时暂停
function fullscreenchange(e) {
if (!e.detail.fullScreen) {
uni.createVideoContext('videoId').pause();
}
}
function handleFullscreenChange(event) {
isFullScreen.value = !isFullScreen.value;
}
// //退出全屏时停止
// function fullscreenchange (e){
// if(!e.detail.fullScreen){
// videoContext.stop()
// }
// };
// 智能排序 // 智能排序
const sortParams = (sortMode) => { const sortParams = (sortMode) => {
sortType.value = sortMode; sortType.value = sortMode;
...@@ -287,11 +339,6 @@ const dataParams = (item, datePart) => { ...@@ -287,11 +339,6 @@ const dataParams = (item, datePart) => {
} }
}; };
// 景点 // 景点
// const placeParams = (item) => {
// console.log(item, 222);
// attractionIdList.value = item.id;
// getProd();
// };
const placeParams = (item) => { const placeParams = (item) => {
const ids = item.map((i) => i.id); const ids = item.map((i) => i.id);
const arr = ids.join(','); const arr = ids.join(',');
...@@ -320,16 +367,15 @@ const screenParams = (selectedItems, type) => { ...@@ -320,16 +367,15 @@ const screenParams = (selectedItems, type) => {
} }
}; };
// 搜索 // 搜索
// 搜索
const toSearch = () => { const toSearch = () => {
xma.navigateTo({ url: '/pages/assistingAgriculture/searchPage/searchPage?prodTypes=10' }); xma.navigateTo({ url: '/pages/assistingAgriculture/searchPage/searchPage?prodTypes=10' });
}; };
const currentPage = ref(1);
// 查询列表 // 查询列表
const getProd = (searchKeyword = '') => { const getProd = (searchKeyword = '') => {
const params = { const params = {
current: 1, current: currentPage.value,
size: 10, size: 3,
...(sortType.value && { sortType: sortType.value.sortMode }), ...(sortType.value && { sortType: sortType.value.sortMode }),
...(attractionIdList.value && ...(attractionIdList.value &&
attractionIdList.value.length > 0 && attractionIdList.value.length > 0 &&
...@@ -352,9 +398,25 @@ const getProd = (searchKeyword = '') => { ...@@ -352,9 +398,25 @@ const getProd = (searchKeyword = '') => {
item.img = import.meta.env.VITE_APP_IMG_URL + item.pic; item.img = import.meta.env.VITE_APP_IMG_URL + item.pic;
item.serveList = item.serviceList.slice(0, 3); item.serveList = item.serviceList.slice(0, 3);
}); });
if (currentPage.value === 1) {
cardList.value = res.data.records; cardList.value = res.data.records;
} else {
cardList.value = cardList.value.concat(res.data.records);
}
// 判断是否还有更多数据
if (res.data.records.length < params.size) {
hasMoreData.value = false; // 没有更多数据
}
}); });
}; };
// 页面滚动到底部触发加载更多
onReachBottom(() => {
if (hasMoreData.value) {
currentPage.value++;
getProd();
}
});
const hasMoreData = ref(true);
const resetParams = () => { const resetParams = () => {
if (sortRef.value || departureDateRef.value || scenicSpotsRef.value || screenRef.value) { if (sortRef.value || departureDateRef.value || scenicSpotsRef.value || screenRef.value) {
sortType.value = null; sortType.value = null;
...@@ -597,6 +659,10 @@ page { ...@@ -597,6 +659,10 @@ page {
font-weight: normal; font-weight: normal;
line-height: 30rpx; line-height: 30rpx;
color: #666666; color: #666666;
height: 30rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
} }
.tag .wd-tag { .tag .wd-tag {
margin-right: 10px; margin-right: 10px;
...@@ -611,11 +677,12 @@ page { ...@@ -611,11 +677,12 @@ page {
color: #0974f5; color: #0974f5;
} }
.price { .price {
position: absolute;
font-size: 28rpx; font-size: 28rpx;
font-weight: bold; font-weight: bold;
line-height: 28rpx; line-height: 28rpx;
color: #fa5151; color: #fa5151;
margin-left: 160rpx; margin-left: 300rpx;
} }
.venue { .venue {
display: flex; display: flex;
...@@ -630,7 +697,7 @@ page { ...@@ -630,7 +697,7 @@ page {
} }
.tag { .tag {
margin-top: 10rpx; margin-top: 10rpx;
width: 400rpx; width: 600rpx;
} }
.detail-score { .detail-score {
margin-top: 30rpx; margin-top: 30rpx;
...@@ -644,7 +711,7 @@ page { ...@@ -644,7 +711,7 @@ page {
display: flex; display: flex;
align-items: center; align-items: center;
padding-left: 20rpx; padding-left: 20rpx;
margin-left: 80rpx; margin-left: 60rpx;
text-align: start; text-align: start;
.magnifyingGlass { .magnifyingGlass {
width: 26rpx; width: 26rpx;
...@@ -660,4 +727,31 @@ page { ...@@ -660,4 +727,31 @@ page {
position: absolute; position: absolute;
margin-top: 140rpx; margin-top: 140rpx;
} }
.wrapper {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
.block {
width: 120px;
height: 120px;
background-color: #fff;
}
uni-video {
width: 300rpx;
height: 200rpx;
top: 10rpx;
left: 20rpx;
border-radius: 16rpx;
}
::v-deep .uni-video-controls {
margin: 0;
}
.no-more-data {
text-align: center;
padding: 20rpx;
color: #999;
}
</style> </style>
...@@ -265,6 +265,7 @@ const toStore = (item) => { ...@@ -265,6 +265,7 @@ const toStore = (item) => {
background-color: #fff; background-color: #fff;
padding: 0 15rpx 0 23rpx; padding: 0 15rpx 0 23rpx;
box-sizing: border-box; box-sizing: border-box;
z-index: 999;
.left { .left {
.check-box { .check-box {
font-size: 24rpx; font-size: 24rpx;
......
...@@ -3,12 +3,11 @@ ...@@ -3,12 +3,11 @@
<!-- 顶部搜索框--> <!-- 顶部搜索框-->
<view class="top"> <view class="top">
<view class="top"> <view class="top">
<Search <Search style="z-index: 99; width: 100%" :type="2" backgroundBox="#fff">
background="rgba(255, 255, 255, 0.8)" <view style="width: 100%; text-align: center; font-size: 36rpx; font-weight: bold">
backIcon="black" 商品详情
iconSrc="/static/assistingAgriculture/assets/blackLeft.png" </view>
placeholderText="请输入要搜索的内容" </Search>
></Search>
</view> </view>
</view> </view>
<!-- 图片--> <!-- 图片-->
...@@ -56,7 +55,7 @@ ...@@ -56,7 +55,7 @@
<view class="bottom" style="display: flex; flex-direction: row"> <view class="bottom" style="display: flex; flex-direction: row">
<view class="borderClass" @tap="toStore"> <view class="borderClass" @tap="toStore">
<img <img
src="/static/assistingAgriculture/detail/img7.png" src="/static/assistingAgriculture/detail/home.png"
style="width: 40rpx; height: 40rpx" style="width: 40rpx; height: 40rpx"
/> />
<view class="sort-text">店铺</view> <view class="sort-text">店铺</view>
...@@ -71,7 +70,7 @@ ...@@ -71,7 +70,7 @@
<view class="borderClass" @tap="toCart"> <view class="borderClass" @tap="toCart">
<wd-badge :modelValue="subscript"> <wd-badge :modelValue="subscript">
<img <img
src="/static/assistingAgriculture/detail/car.png" src="/static/assistingAgriculture/detail/carImg.png"
style="width: 40rpx; height: 40rpx" style="width: 40rpx; height: 40rpx"
/> />
</wd-badge> </wd-badge>
...@@ -97,7 +96,6 @@ ...@@ -97,7 +96,6 @@
</template> </template>
<script setup> <script setup>
import Search from '../../../components/assistingAgriculture/index/Search.vue';
import { ref } from 'vue'; import { ref } from 'vue';
import { onShow } from '@dcloudio/uni-app'; import { onShow } from '@dcloudio/uni-app';
import { import {
...@@ -237,18 +235,6 @@ function toSettle() { ...@@ -237,18 +235,6 @@ function toSettle() {
page { page {
background-color: #f3f3f3; background-color: #f3f3f3;
} }
.container {
position: relative;
left: 0rpx;
top: -45rpx;
opacity: 1;
}
.top {
width: 750rpx;
height: 128rpx;
margin-top: 40rpx;
background: #ffffff;
}
.nav { .nav {
width: 750rpx; width: 750rpx;
} }
...@@ -438,13 +424,13 @@ page { ...@@ -438,13 +424,13 @@ page {
} }
.detail-bottom { .detail-bottom {
width: 750rpx; width: 750rpx;
height: 216rpx; height: 140rpx;
border-radius: 16rpx 16px 0rpx 0rpx; border-radius: 16rpx 16px 0rpx 0rpx;
background: #ffffff; background: #ffffff;
box-shadow: 0rpx -8rpx 20rpx 0rpx rgba(0, 0, 0, 0.12); box-shadow: 0rpx -8rpx 20rpx 0rpx rgba(0, 0, 0, 0.12);
z-index: 10; z-index: 10;
position: fixed; position: fixed;
top: 88%; top: 91%;
} }
.sort { .sort {
width: 750rpx; width: 750rpx;
...@@ -470,8 +456,4 @@ page { ...@@ -470,8 +456,4 @@ page {
margin-top: -90rpx; margin-top: -90rpx;
margin-left: 400rpx; margin-left: 400rpx;
} }
::v-deep.icon {
width: 56rpx;
height: 56rpx;
}
</style> </style>
...@@ -134,7 +134,7 @@ ...@@ -134,7 +134,7 @@
</view> </view>
</view> </view>
<!-- 购物车悬浮按钮 --> <!-- 购物车悬浮按钮 -->
<view class="cart-floating" @tap="toCart"> <!--<view class="cart-floating" @tap="toCart">
<wd-badge :modelValue="subscript"> <wd-badge :modelValue="subscript">
<img <img
class="shop-car" class="shop-car"
...@@ -142,8 +142,8 @@ ...@@ -142,8 +142,8 @@
style="width: 40rpx; height: 40rpx" style="width: 40rpx; height: 40rpx"
/> />
</wd-badge> </wd-badge>
</view> </view>-->
<fab /> <fab position="2" />
</view> </view>
</template> </template>
...@@ -497,7 +497,7 @@ img.rice { ...@@ -497,7 +497,7 @@ img.rice {
display: flex; display: flex;
align-items: center; align-items: center;
padding-left: 20rpx; padding-left: 20rpx;
margin-left: 80rpx; margin-left: 60rpx;
text-align: start; text-align: start;
.magnifyingGlass { .magnifyingGlass {
width: 26rpx; width: 26rpx;
......
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
</view> </view>
</view> </view>
</view> </view>
<fab /> <fab position="0" />
</view> </view>
</template> </template>
...@@ -302,7 +302,7 @@ page { ...@@ -302,7 +302,7 @@ page {
display: flex; display: flex;
align-items: center; align-items: center;
padding-left: 20rpx; padding-left: 20rpx;
margin-left: 80rpx; margin-left: 60rpx;
text-align: start; text-align: start;
.magnifyingGlass { .magnifyingGlass {
width: 26rpx; width: 26rpx;
......
...@@ -128,7 +128,7 @@ ...@@ -128,7 +128,7 @@
</view> </view>
</view> </view>
<!-- 购物车悬浮按钮 --> <!-- 购物车悬浮按钮 -->
<view class="cart-floating" @tap="toCart"> <!--<view class="cart-floating" @tap="toCart">
<wd-badge :modelValue="subscript"> <wd-badge :modelValue="subscript">
<img <img
class="shop-car" class="shop-car"
...@@ -136,7 +136,8 @@ ...@@ -136,7 +136,8 @@
style="width: 40rpx; height: 40rpx" style="width: 40rpx; height: 40rpx"
/> />
</wd-badge> </wd-badge>
</view> </view>-->
<fab position="2" />
</template> </template>
<script setup> <script setup>
...@@ -150,7 +151,7 @@ import { ...@@ -150,7 +151,7 @@ import {
getStrictSelection, getStrictSelection,
} from '../../../api/assistingAgriculture/building'; } from '../../../api/assistingAgriculture/building';
import { getshoppingCartList } from '@/api/packageDetail'; import { getshoppingCartList } from '@/api/packageDetail';
import fab from '../../../components/fab/fab.vue';
const swiperList = ref([]); const swiperList = ref([]);
const current = ref(0); const current = ref(0);
// 轮播图数据 // 轮播图数据
...@@ -526,7 +527,7 @@ page { ...@@ -526,7 +527,7 @@ page {
display: flex; display: flex;
align-items: center; align-items: center;
padding-left: 20rpx; padding-left: 20rpx;
margin-left: 80rpx; margin-left: 60rpx;
text-align: start; text-align: start;
.magnifyingGlass { .magnifyingGlass {
width: 26rpx; width: 26rpx;
......
...@@ -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':
......
...@@ -139,7 +139,7 @@ ...@@ -139,7 +139,7 @@
:file-list="testFileList[item.areaId]" :file-list="testFileList[item.areaId]"
image-mode="aspectFill" image-mode="aspectFill"
:action="action" :action="action"
@change="handleCategoyChange($event, item.areaId, item.areaName)" @change="handleCategoyChange($event, item.areaId)"
:limit="1" :limit="1"
class="img1" class="img1"
:header="headers" :header="headers"
...@@ -167,6 +167,7 @@ ...@@ -167,6 +167,7 @@
v-model="show" v-model="show"
position="bottom" position="bottom"
custom-style="height:500px;overflow:auto;" custom-style="height:500px;overflow:auto;"
safe-area-inset-bottom="true"
@close="handleClose" @close="handleClose"
> >
<view class="hcontent"> <view class="hcontent">
...@@ -293,7 +294,6 @@ const beforeRemove = ({ file, fileList, resolve }) => { ...@@ -293,7 +294,6 @@ const beforeRemove = ({ file, fileList, resolve }) => {
*/ */
const processingImageAddresses = (fileList) => { const processingImageAddresses = (fileList) => {
const data = fileList.value.map((item) => { const data = fileList.value.map((item) => {
console.log(JSON.parse(item.response));
return JSON.parse(item.response).data.url; return JSON.parse(item.response).data.url;
}); });
return data.join(','); return data.join(',');
...@@ -305,28 +305,26 @@ const processingImageAddresses1 = (fileList) => { ...@@ -305,28 +305,26 @@ const processingImageAddresses1 = (fileList) => {
return data.join(','); return data.join(',');
}; };
const categoryShopsList = ref({});
// 新增经营资质上传 // 新增经营资质上传
const testFileList = ref([]); const testFileList = ref([]);
const handleCategoyChange = ({ fileList: files }, valId, valName) => { const handleCategoyChange = ({ fileList: files }, valId) => {
testFileList.value[valId] = files; testFileList.value[valId] = files;
// 资质上传图片 // 资质上传图片
// 资质清空图片 // 资质清空图片
choosedShopInfo.value.forEach((item) => {
if (item.areaId === valId) {
choosedShopInfo.value.forEach((item) => { choosedShopInfo.value.forEach((item) => {
if (item.areaId === valId) { if (item.areaId === valId) {
item.qualifications = item.qualifications =
files.length === 0 ? '' : processingImageAddresses1(testFileList.value[valId]); files.length === 0 ? '' : processingImageAddresses1(testFileList.value[valId]);
} }
}); });
}
});
console.log('在删除或上传资质图片时'); // 修改本地存储的值
console.log(choosedShopInfo.value); try {
xma.setStorageSync('storage_choosedShopInfo', JSON.stringify(choosedShopInfo.value));
} catch (e) {
console.log(e);
}
}; };
// 店铺logo门头上传 // 店铺logo门头上传
...@@ -493,9 +491,7 @@ const getShopInfoByIdFun = async (data) => { ...@@ -493,9 +491,7 @@ const getShopInfoByIdFun = async (data) => {
// 店铺分类:点击左侧团购、助农tab,添加active样式,清空选择的店铺类型数组 // 店铺分类:点击左侧团购、助农tab,添加active样式,清空选择的店铺类型数组
const setActiveCategory = (index) => { const setActiveCategory = (index) => {
console.log(index);
categoryActiveIndex.value = index; categoryActiveIndex.value = index;
choosedShopArr.value = [];
}; };
// 店铺分类是否显示 // 店铺分类是否显示
......
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