Commit 6250c0d0 authored by 张娇(东信)'s avatar 张娇(东信)

Merge remote-tracking branch 'origin/master'

parents 71f51035 e29f1366
...@@ -75,7 +75,7 @@ const back = () => { ...@@ -75,7 +75,7 @@ const back = () => {
}; };
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.searchComponent { .searchComponent {
position: sticky; position: sticky;
top: 0; top: 0;
......
...@@ -186,9 +186,7 @@ ...@@ -186,9 +186,7 @@
{ {
"path": "pages/assistingAgriculture/album/index", "path": "pages/assistingAgriculture/album/index",
"style": { "style": {
"navigationBarTitleText": "用户相册", "navigationBarTitleText": "用户相册"
"navigationBarBackgroundColor": "#ffffff",
"navigationStyle": ""
} }
}, },
{ {
...@@ -196,7 +194,7 @@ ...@@ -196,7 +194,7 @@
"style": { "style": {
"navigationBarTitleText": "购物车", "navigationBarTitleText": "购物车",
"navigationBarBackgroundColor": "#ffffff", "navigationBarBackgroundColor": "#ffffff",
"navigationStyle": "" "navigationStyle": "custom"
} }
}, },
{ {
...@@ -211,7 +209,7 @@ ...@@ -211,7 +209,7 @@
"path": "pages/assistingAgriculture/RuralTravel/RuralTravel", "path": "pages/assistingAgriculture/RuralTravel/RuralTravel",
"style": { "style": {
"navigationBarTitleText": "乡村旅居", "navigationBarTitleText": "乡村旅居",
"enablePullDownRefresh": true, "enablePullDownRefresh": true
} }
}, },
{ {
......
<template> <template>
<div class="route-details"> <div class="route-details">
<Search></Search>
<scroll-view class="container" scroll-y> <scroll-view class="container" scroll-y>
<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">
<!-- --> <!-- -->
...@@ -541,6 +542,13 @@ uni-page-body { ...@@ -541,6 +542,13 @@ uni-page-body {
background-color: #eaf9f1; background-color: #eaf9f1;
} }
.route-details { .route-details {
.searchComponent {
z-index: 55;
width: 100%;
position: fixed;
top: 0;
left: 0;
}
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
......
<template> <template>
<div class="album"> <div class="album">
<Search backgroundBox="white" title="用户相册" :showTitle="true"></Search>
<scroll-view class="content" @scrolltolower="scrolltolower" scroll-y> <scroll-view class="content" @scrolltolower="scrolltolower" scroll-y>
<!-- <div class="filter-box">
<div class="active">全部</div>
<div v-for="(v, i) in filterList" :key="i">{{ v.text }}({{ v.value }})</div>
</div> -->
<div class="card-wrap"> <div class="card-wrap">
<card :photoData="photoData" /> <card :photoData="photoData" />
</div> </div>
......
<template> <template>
<Search title="购物车" showTitle backgroundBox="#fff"></Search>
<div class="cart-wrap"> <div class="cart-wrap">
<div class="shop" v-for="(shop, i) in cartList" :key="i"> <div class="shop" v-for="(shop, i) in cartList" :key="i">
<div class="flex-align-center shop-info"> <div class="flex-align-center shop-info">
......
<template> <template>
<div class="comment-list"> <div class="comment-list">
<div class="top-bar flex-align-center"> <!-- <div class="top-bar flex-align-center">
<wd-icon name="thin-arrow-left" @tap="back"></wd-icon> <wd-icon name="thin-arrow-left" @tap="back"></wd-icon>
<wd-search @search="search" hide-cancel placeholder="点评关键词/特色" placeholder-left /> <wd-search @search="search" hide-cancel placeholder="点评关键词/特色" placeholder-left />
</div> </div> -->
<Search backgroundBox="white">
<wd-search @search="search" hide-cancel placeholder="点评关键词/特色" placeholder-left />
</Search>
<scroll-view @scrolltolower="scrolltolower" class="content" :scroll-y="true"> <scroll-view @scrolltolower="scrolltolower" class="content" :scroll-y="true">
<div class="filter-box"> <div class="filter-box">
<div class="score-sort flex-between"> <div class="score-sort flex-between">
...@@ -189,16 +192,11 @@ uni-page-body { ...@@ -189,16 +192,11 @@ uni-page-body {
background-color: #f3f3f3; background-color: #f3f3f3;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.top-bar {
padding: 16rpx 40rpx;
font-size: 28rpx;
background: #fff;
.wd-search { .wd-search {
width: 492rpx; width: 492rpx;
height: 56rpx; height: 56rpx;
padding: 0; padding: 0;
margin-left: 20rpx; margin-left: 50rpx;
}
} }
.content { .content {
height: 132rpx; height: 132rpx;
......
...@@ -326,7 +326,7 @@ page { ...@@ -326,7 +326,7 @@ page {
} }
.searchBoxs { .searchBoxs {
width: 480rpx; width: 420rpx;
height: 56rpx; height: 56rpx;
background: #f3f3f3; background: #f3f3f3;
border-radius: 28rpx 28rpx 28rpx 28rpx; border-radius: 28rpx 28rpx 28rpx 28rpx;
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
></web-view> ></web-view>
<!-- <view style="height: 600rpx; background-color: aquamarine"></view> --> <!-- <view style="height: 600rpx; background-color: aquamarine"></view> -->
<view class="content" v-if="orderDetail"> <view class="content" v-if="orderDetail">
<view class="info"> <view class="info" :style="{ 'padding-top': logisticsDetail ? '30rpx' : '60rpx' }">
<view class="top" v-if="logisticsDetail"> <view class="top" v-if="logisticsDetail">
<view class="left"> <view class="left">
<image <image
...@@ -711,7 +711,7 @@ page { ...@@ -711,7 +711,7 @@ page {
background: #f12a2a; background: #f12a2a;
border-radius: 50%; border-radius: 50%;
position: absolute; position: absolute;
top: 6rpx; top: -14rpx;
z-index: 1; z-index: 1;
} }
...@@ -721,7 +721,7 @@ page { ...@@ -721,7 +721,7 @@ page {
background: #ffd5d5; background: #ffd5d5;
border-radius: 50%; border-radius: 50%;
position: absolute; position: absolute;
top: 6rpx; top: -14rpx;
z-index: 1; z-index: 1;
} }
...@@ -729,8 +729,8 @@ page { ...@@ -729,8 +729,8 @@ page {
height: 100%; height: 100%;
width: 2rpx; width: 2rpx;
background-color: #ffd5d5; background-color: #ffd5d5;
position: absolute; // position: absolute;
top: 6rpx; // top: 6rpx;
} }
} }
......
<template> <template>
<view class="container"> <view class="container">
<wd-icon name="thin-arrow-left" class="icon" @tap="back"></wd-icon> <Search title="优惠券" :showTitle="true" backgroundBox="white"></Search>
<scroll-view class="tabs" scroll-x="true" @scroll="scroll"> <scroll-view class="tabs" scroll-x="true" @scroll="scroll">
<text <text
@tap="choice(index, item.value)" @tap="choice(index, item.value)"
...@@ -145,18 +145,10 @@ page { ...@@ -145,18 +145,10 @@ page {
} }
.container { .container {
position: relative; position: relative;
.icon {
font-size: 28rpx;
margin-right: 40rpx;
position: absolute;
left: 30rpx;
top: 37rpx;
z-index: 999;
}
.tabs { .tabs {
white-space: nowrap; white-space: nowrap;
padding: 0 30rpx; padding: 0 30rpx;
padding-left: 80rpx; // padding-left: 80rpx;
box-sizing: border-box; box-sizing: border-box;
height: 100rpx; height: 100rpx;
line-height: 100rpx; line-height: 100rpx;
...@@ -167,7 +159,6 @@ page { ...@@ -167,7 +159,6 @@ page {
position: sticky; position: sticky;
top: 0; top: 0;
z-index: 99; z-index: 99;
.tab { .tab {
display: inline-block; display: inline-block;
margin-right: 40rpx; margin-right: 40rpx;
......
...@@ -149,7 +149,7 @@ ...@@ -149,7 +149,7 @@
<!-- 美食卡片 --> <!-- 美食卡片 -->
<FoodDetails :cardData="cardData1" /> <FoodDetails :cardData="cardData1" />
<!-- 营销模块 --> <!-- 营销模块 -->
<Marketing /> <!-- <Marketing /> -->
<!-- 美食卡片 --> <!-- 美食卡片 -->
<FoodDetails :cardData="cardData2" /> <FoodDetails :cardData="cardData2" />
<view <view
...@@ -807,8 +807,8 @@ page { ...@@ -807,8 +807,8 @@ page {
box-shadow: 0rpx 4rpx 16rpx 0rpx rgba(0, 0, 0, 0.08); box-shadow: 0rpx 4rpx 16rpx 0rpx rgba(0, 0, 0, 0.08);
margin: 0 auto; margin: 0 auto;
margin-top: 10rpx; margin-top: 10rpx;
position: sticky; // position: sticky;
top: 0; // top: 0;
z-index: 99; z-index: 99;
uni-scroll-view .uni-scroll-view::-webkit-scrollbar { uni-scroll-view .uni-scroll-view::-webkit-scrollbar {
/* 隐藏滚动条,但依旧具备可以滚动的功能 */ /* 隐藏滚动条,但依旧具备可以滚动的功能 */
......
<template> <template>
<view class="container"> <view class="container">
<search
:backIcon="backIcon"
style="position: fixed; top: 0; width: 100%"
:backgroundBox="backgroundBox"
:title="title"
:showTitle="true"
></search>
<view class="head"> <view class="head">
<view class="top" :style="{ backgroundImage: topBg }"> <view class="top" :style="{ backgroundImage: topBg }"></view>
<wd-icon name="thin-arrow-left" class="icon" @tap="back"></wd-icon>
</view>
<view class="bootom"> <view class="bootom">
<view class="bootom-top"> <view class="bootom-top">
<view class="option" @tap="locationFiltering(0)"> <view class="option" @tap="locationFiltering(0)">
...@@ -88,6 +93,9 @@ const topBg = ref(null); ...@@ -88,6 +93,9 @@ const topBg = ref(null);
const categoryData = ref([]); const categoryData = ref([]);
const show = ref(false); const show = ref(false);
const cardData = ref([]); const cardData = ref([]);
const backgroundBox = ref('');
const backIcon = ref('white');
const title = ref('');
let total; let total;
const paramsId = { const paramsId = {
parentId: null, parentId: null,
...@@ -240,6 +248,18 @@ const locationFiltering = (index) => { ...@@ -240,6 +248,18 @@ const locationFiltering = (index) => {
break; break;
} }
}; };
// 监听页面滚动
onPageScroll((e) => {
if (e.scrollTop > 20) {
backgroundBox.value = '#fff';
backIcon.value = '';
title.value = '美食';
} else {
backgroundBox.value = '';
backIcon.value = 'white';
title.value = '';
}
});
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -709,7 +709,7 @@ page { ...@@ -709,7 +709,7 @@ page {
gap: 14rpx; gap: 14rpx;
} }
.searchBoxs { .searchBoxs {
width: 492rpx; width: 420rpx;
height: 66rpx; height: 66rpx;
background: #f3f3f3; background: #f3f3f3;
border-radius: 33rpx; border-radius: 33rpx;
......
...@@ -391,7 +391,17 @@ onLoad((options) => { ...@@ -391,7 +391,17 @@ onLoad((options) => {
} }
getShopCategoryFun(); getShopCategoryFun();
}); });
onUnload(() => {
try {
const value = xma.getStorageSync('storage_choosedShopInfo');
if (value && JSON.parse(value).length > 0) {
console.log('hhh');
xma.removeStorageSync('storage_choosedShopInfo');
}
} catch (e) {
// error
}
});
// 获取店铺入驻分类(弹窗tree) // 获取店铺入驻分类(弹窗tree)
const getShopCategoryFun = async () => { const getShopCategoryFun = async () => {
const res = await sgyrShopCategory(); const res = await sgyrShopCategory();
...@@ -679,7 +689,7 @@ const submitData = () => { ...@@ -679,7 +689,7 @@ const submitData = () => {
}); });
} }
try { try {
xma.setStorageSync('storage_choosedShopInfo', {}); xma.removeStorageSync('storage_choosedShopInfo');
xma.showToast({ xma.showToast({
title: '修改成功', title: '修改成功',
icon: 'success', icon: 'success',
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class="container"> <view class="container">
<!-- <Header :title="shopDetail.shopName"></Header> --> <!-- <Header :title="shopDetail.shopName"></Header> -->
<Search :title="shopDetail.shopName" backgroundBox="white" :showTitle="true"></Search> <Search :title="shopDetail.shopName" backgroundBox="white" :showTitle="true"></Search>
<view class="content"> <view class="content1">
<view class="shop"> <view class="shop">
<image :src="fileDomain + shopDetail.shopLogo" class="logo" mode="aspectFill"></image> <image :src="fileDomain + shopDetail.shopLogo" class="logo" mode="aspectFill"></image>
<view class="info"> <view class="info">
...@@ -339,7 +339,7 @@ page { ...@@ -339,7 +339,7 @@ page {
.container { .container {
width: 375 * 2rpx; width: 375 * 2rpx;
margin: 0 auto; margin: 0 auto;
.content { .content1 {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding: 20rpx 26rpx 26rpx; padding: 20rpx 26rpx 26rpx;
......
...@@ -121,10 +121,21 @@ ...@@ -121,10 +121,21 @@
<script setup> <script setup>
import { myCouponListApi, userCouponStatisticsApi } from '@/api/ticket'; import { myCouponListApi, userCouponStatisticsApi } from '@/api/ticket';
import { signIn } from '@/utils/signIn';
import Header from '@/pages/order/components/Header/index.vue'; import Header from '@/pages/order/components/Header/index.vue';
import testJson from '@/static/json/test.json';
import { getTokenUser } from '@/api/index';
import { getToken } from '@/utils/auth';
const fileDomain = import.meta.env.VITE_APP_IMG_URL; const fileDomain = import.meta.env.VITE_APP_IMG_URL;
onLoad(async () => {
if (!getToken()) await signIn();
// if (!getToken()) await signIn2();
getStatistics();
getCouponList();
});
// 优惠券状态 0:失效 2:已使用,3-未使用 // 优惠券状态 0:失效 2:已使用,3-未使用
const iconUrl = ref({ const iconUrl = ref({
0: '@/static/ticket/past-icon.png', 0: '@/static/ticket/past-icon.png',
...@@ -173,7 +184,6 @@ const getStatistics = async () => { ...@@ -173,7 +184,6 @@ const getStatistics = async () => {
discountAmount.value = res.data; discountAmount.value = res.data;
} }
}; };
getStatistics();
/** /**
* 获取用户优惠券列表 * 获取用户优惠券列表
...@@ -213,7 +223,21 @@ const getCouponList = async () => { ...@@ -213,7 +223,21 @@ const getCouponList = async () => {
// state.value = 'finished'; // state.value = 'finished';
xma.hideLoading(); xma.hideLoading();
}; };
getCouponList();
// 登录
const signIn2 = () => {
xma.showLoading({
title: '加载中',
mask: true,
});
return getTokenUser(testJson).then((res) => {
const token = res.data.access_token;
const userInfo = res.data.user_info;
xma.setStorageSync('Authorization', token);
xma.setStorageSync('userInfo', userInfo);
console.log('登录...');
});
};
// 下拉刷新 // 下拉刷新
onPullDownRefresh(() => { onPullDownRefresh(() => {
......
...@@ -6198,6 +6198,11 @@ xinhua-sdk@*: ...@@ -6198,6 +6198,11 @@ xinhua-sdk@*:
resolved "https://registry.npmmirror.com/xinhua-sdk/-/xinhua-sdk-1.6.1.tgz" resolved "https://registry.npmmirror.com/xinhua-sdk/-/xinhua-sdk-1.6.1.tgz"
integrity sha512-Pjhwgn6lme5MxA6EcXQLD7ZEZMUZWJ714yLJCOkwEW96Yr0oS2JItnJA4NNYUP2hQBqQLc9SAUrOn9QOpFcQdw== integrity sha512-Pjhwgn6lme5MxA6EcXQLD7ZEZMUZWJ714yLJCOkwEW96Yr0oS2JItnJA4NNYUP2hQBqQLc9SAUrOn9QOpFcQdw==
xinhua-sdk@^1.8.0:
version "1.8.0"
resolved "https://registry.npmmirror.com/xinhua-sdk/-/xinhua-sdk-1.8.0.tgz#a67fd21ed76f4489935cb5b4b0c9b8fde544da6b"
integrity sha512-5aXpi+zql1d+ojaERMtcgGZHsVEJAyKRctQJ8RlixPRa0jttBTTIaZaMXUzJtLxlnB82n4uhX/oJ8TNb65TbPA==
xml-name-validator@^4.0.0: xml-name-validator@^4.0.0:
version "4.0.0" version "4.0.0"
resolved "https://registry.npmmirror.com/xml-name-validator/-/xml-name-validator-4.0.0.tgz" resolved "https://registry.npmmirror.com/xml-name-validator/-/xml-name-validator-4.0.0.tgz"
......
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