master
xy 1 year ago
parent 64307ea3a0
commit 85c747cdb3

@ -9,7 +9,7 @@
@tap.stop="clickHandler(item)">
<view class="icon">
<img class="active-bkg" src="/static/tabbar/active-bkg.svg" alt="">
<img class="icon__inner" :src="item.iconPath" alt="" >
<img class="icon__inner" :src="item.myIconPath" alt="" >
</view>
<text class="text">{{ item.text }}</text>
</view>
@ -18,30 +18,16 @@
</template>
<script>
import pages from '@/pages.json'
export default {
data() {
return {
pageUrl: '',
pages: [
{
"pagePath": "pages/index/index",
"text": "首页",
"iconPath": "/static/tabbar/home.svg",
},
{
"pagePath": "pages/order/order",
"text": "订单",
"iconPath": "/static/tabbar/order.svg",
},
{
"pagePath": "pages/me/me",
"text": "我的",
"iconPath": "/static/tabbar/me.svg",
}
]
pages: []
};
},
created() {
this.pages = pages.tabBar.list
uni.hideTabBar();
// u-tabbar"/"
let curPages = getCurrentPages();
@ -117,8 +103,6 @@ export default {
$activeSize: 94rpx;
width: $activeSize;
height: $activeSize;
//background: linear-gradient(to right, #b5261a, #d05b58 26%, #d66766);
//clip-path: polygon(50% 0%, 96% 20%, 96% 80%, 50% 100%, 4% 80%, 4% 20%);
.active-bkg {
display: inherit;
width: $activeSize;

File diff suppressed because one or more lines are too long

@ -8,7 +8,6 @@ Vue.use(uView);
let vuexStore = require('@/store/$u.mixin.js');
Vue.mixin(vuexStore);
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
@ -25,4 +24,7 @@ Vue.use(httpInterceptor, app)
import httpApi from '@/common/http.api.js'
Vue.use(httpApi, app)
import moment from '@/libs/moment.min.js'
Vue.prototype.$moment = moment
app.$mount()

@ -0,0 +1,397 @@
<template>
<view class="page">
<image class="bkg" mode="aspectFill" src="~@/package_sub/static/AddOrder/bkg.png"></image>
<view class="container">
<view class="step">
<view class="step-item"
v-for="(i, index) in stepList"
:class="{ 'is-active': currentStep === index }"
:key="index">
<view class="step-item__dot">
<u-icon v-show="currentStep === index" name="checkbox-mark" color="#fff" size="16"></u-icon>
</view>
<view class="step-item__text">{{ i.name }}</view>
</view>
</view>
<view class="switch-service">
<view class="switch-service__icon">
<u-icon name="integral" size="30"></u-icon>
</view>
<view class="switch-service__name">
专享半天陪诊
</view>
<view class="switch-service__btn" @click="isShowService = true">
<image src="~@/static/switch.png" mode="aspectFit"></image>
<text>更换服务</text>
</view>
</view>
<u-form :model="form" ref="uForm" :label-width="178" :label-style="{ 'font-weight': '500','font-size': '24rpx' }">
<view class="form-card form-card-1">
<u-form-item label="就诊城市">
<u-input type="select" placeholder="请选择就诊城市" v-model="form.name" :select-open="isShowCity" @click="isShowCity = true"/>
</u-form-item>
<u-form-item label="就诊医院">
<u-input v-model="form.name" placeholder="请输入就诊医院" />
</u-form-item>
<u-form-item label="就诊时间">
<u-input type="select" v-model="form.name" :select-open="isShowTime" @click="isShowTime = true"/>
</u-form-item>
<u-form-item label="就诊人">
<u-input v-model="form.name" />
</u-form-item>
<u-form-item label="是否可以自理">
<u-radio-group v-model="form.name" slot="right" active-color="#c20d12">
<u-radio :name="1"></u-radio>
<u-radio :name="0"></u-radio>
</u-radio-group>
</u-form-item>
<u-form-item label="预约人">
<u-input v-model="form.name" placeholder="请填写预约人" />
</u-form-item>
<u-form-item label="预约人电话">
<u-input v-model="form.name" placeholder="请填写预约人电话" />
</u-form-item>
<u-form-item label="选择陪诊师性别" :border-bottom="false">
<u-radio-group v-model="form.name" slot="right" active-color="#c20d12">
<u-radio name="男"></u-radio>
<u-radio name="女"></u-radio>
<u-radio name="">任意</u-radio>
</u-radio-group>
</u-form-item>
</view>
<view class="form-card form-card-2">
<view class="title">
<view class="title__left">
<text>上传资料</text>
<text>就诊卡病例等</text>
</view>
<view class="title__right">
点击查看示例
</view>
</view>
<u-upload :action="action" :file-list="fileList" ></u-upload>
</view>
<view class="form-card form-card-3">
<view class="title">
其他服务需求
</view>
<u-form-item :label-width="0" :border-bottom="false">
<u-input border
:custom-style="{ 'letter-spacing': '2rpx' }"
border-color="#dad9d9"
placeholder="请简单描述您要就诊的科室及就诊内容(内容加密保护)"
v-model="form.name"
type="textarea"></u-input>
</u-form-item>
</view>
</u-form>
<view class="is-auth">
<u-checkbox v-model="isAuth" shape="circle" active-color="#c20d12">
<text style="padding-left: 10rpx;">我已认真阅读预约相关</text>
<text style="color: #c20d12;" @click.stop.prevent>服务条款同意书</text>
</u-checkbox>
</view>
</view>
<view class="bottom-bar">
<view class="price">
<text>实付</text>
<text>¥ 600.00</text>
</view>
<u-button shape="circle" ripple :custom-style="payBtnStyle" @click="next"></u-button>
</view>
<u-select v-model="isShowService" :list="services"></u-select>
<u-select v-model="isShowCity" :list="cities"></u-select>
<u-picker v-model="isShowTime" mode="time"></u-picker>
<u-top-tips ref="uTips"></u-top-tips>
</view>
</template>
<script>
export default {
data() {
return {
payBtnStyle: {
'background-image': 'linear-gradient(-90deg, #e26165 0%, #c10d12 94%, #c10d12 100%)',
'font-weight': '500',
'font-size': '28rpx',
'color': '#fff',
'width': '288rpx',
'margin-right': '25rpx'
},
// service
isShowService: false,
services: [
{
value: '1',
label: '江'
},
{
value: '2',
label: '湖'
}
],
//
// step
currentStep: 0,
stepList: [
{
name: '填写预约'
},
{
name: '在线支付'
},
{
name: '专人陪诊'
},
{
name: '服务完成'
}
],
//
// form
isShowCity: false,
cities: [
{
value: '1',
label: '江'
},
{
value: '2',
label: '湖'
}
],
isShowTime: false,
form: {
name: ''
},
rules: {},
fileList: [],
action: '',
isAuth: false
//
};
},
methods: {
next () {
if (!this.isAuth && this.currentStep === 0) {
this.$refs.uTips.show({
title: '请认真阅读《服务条款同意书》!',
type: 'warning',
duration: '2000'
})
return
}
this.currentStep++
}
},
onReady() {
this.$refs.uForm.setRules(this.rules);
}
}
</script>
<style lang="scss" scoped>
.page {
position: relative;
.bkg {
width: 100vw;
z-index: 0;
height: 550rpx;
position: absolute;
top: 0;
left: 0;
}
.container {
z-index: 1;
position: relative;
padding-bottom: calc(27rpx * 2 + 80rpx + 20rpx);
padding-bottom: calc(constant(safe-area-inset-bottom) + 27rpx * 2 + 80rpx + 20rpx);
padding-bottom: calc(env(safe-area-inset-bottom) + 27rpx * 2 + 80rpx + 20rpx);
.step {
display: flex;
justify-content: space-evenly;
padding: 64rpx 37rpx 0;
position: relative;
&::before {
content: '';
height: 12rpx;
background: #fff;
border-radius: 6rpx;
position: absolute;
left: 37rpx;
right: 37rpx;
top: calc(26rpx / 2 + 64rpx - 6rpx);
}
&-item {
&__dot {
width: 30rpx;
height: 30rpx;
border-radius: 100%;
filter: drop-shadow(0 0 10rpx rgba(211,32,2,0.3));
background-color: #9b9c9c;
border: 2rpx solid #ffffff;
margin: auto;
display: flex;
align-items: center;
justify-content: center;
}
&__text {
font-size: 24rpx;
color: #333333;
font-weight: 500;
margin-top: 30rpx;
}
}
.is-active {
.step-item__dot {
filter: drop-shadow(4.384px 8.988px 10px rgba(211,32,2,0.57));
background-image: linear-gradient(-90deg, #e26165 0%, #c10d12 94%, #c10d12 100%);
transform: scale(2, 2);
}
.step-item__text {
color: #c20d12;
}
}
}
.switch-service {
border-radius: 10rpx;
background-color: #ffffff;
margin: 60rpx 25rpx 0;
padding: 28rpx 39rpx;
display: flex;
align-items: center;
&__icon {
display: flex;
justify-content: center;
align-items: center;
background: #f9f5e9;
padding: 20rpx;
}
&__name {
padding-left: 14rpx;
font-size: 28rpx;
color: #333333;
font-weight: 500;
}
&__btn {
display: flex;
align-items: center;
margin-left: auto;
& > image {
width: 31rpx;
height: 27rpx;
}
& > text {
font-size: 24rpx;
color: #999999;
padding-left: 20rpx;
}
}
}
.form-card {
border-radius: 10rpx;
background-color: #ffffff;
padding: 36rpx 38rpx;
margin: 0 25rpx;
&-1 {
margin-top: 44rpx;
}
&-2 {
margin-top: 24rpx;
.title {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 24rpx;
margin-bottom: 26rpx;
&__left text:nth-child(1) {
color: #333;
}
&__left text:nth-child(2) {
color: #999;
}
&__right {
color: #c20d12;
}
}
::v-deep .u-add-wrap {
background: #fff;
border: 2rpx dashed #999999;
}
}
&-3 {
margin-top: 20rpx;
.title {
font-size: 24rpx;
color: #333333;
margin-bottom: 22rpx;
}
}
}
.is-auth {
padding-left: 56rpx;
margin-top: 22rpx;
}
::v-deep .form-card-1 .u-input__input {
text-align: right;
}
}
}
.bottom-bar {
background: #fff;
position: fixed;
padding-top: 27rpx;
padding-bottom: 27rpx;
padding-bottom: calc(constant(safe-area-inset-bottom) + 27rpx);
padding-bottom: calc(env(safe-area-inset-bottom) + 27rpx);
width: 100vw;
left: 0;
bottom: 0;
z-index: 10;
display: flex;
align-items: center;
justify-content: space-between;
filter: drop-shadow(0 2rpx 6rpx #00000020);
.price {
margin-left: 50rpx;
color: #c20d12;
& > text:nth-child(1) {
font-size: 24rpx;
}
& > text:nth-child(2) {
color: #c20d12;
font-weight: 500;
font-size: 40rpx;
}
}
}
</style>

@ -0,0 +1,183 @@
<template>
<view class="page">
<image class="bkg" src="~@/package_sub/static/ServiceDetail/bkg.png" mode="aspectFill"></image>
<view class="container">
<view class="card detail">
<view class="detail__text">
全程1对1陪同就医代取号代排队代跑腿打印报告等服务患者可以更加灵活安排时间不但解决无人陪同难题以及排队费时环境
</view>
<view class="detail__price">
<text class="detail__price--number">600</text>
<text class="detail__price--text">/</text>
</view>
</view>
<view class="tab">
<view v-for="(item, index) in ['','']"
:key="index"
class="tab-item"
:class="{ 'is-active': index === currentTab }"
@click="$u.throttle(() => currentTab = index)">
{{ item }}
</view>
</view>
<view class="card for-people">
<view class="for-people__title">
服务流程
</view>
<view class="for-people__content">
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
currentTab: 0,
};
},
onLoad(option) {
uni.setNavigationBarTitle({
title: option.title ?? "服务项目"
});
},
mounted() {
},
}
</script>
<style lang="scss" scoped>
.page {
.bkg {
height: 316rpx;
width: 100vw;
z-index: 0;
position: absolute;
top: 0;
left: 0;
}
.container {
z-index: 1;
position: relative;
padding-top: 250rpx;
.card {
border-radius: 10rpx;
filter: drop-shadow(2.192px 4.494px 5px rgba(33,32,32,0.15));
background-color: #ffffff;
}
.detail {
margin: 0 24rpx;
padding: 26rpx 22rpx;
&__text {
font-size: 24rpx;
line-height: 1.5;
color: #929196;
font-weight: 500;
}
&__price {
margin-top: 24rpx;
color: #c20d12;
padding-left: 16rpx;
&--number {
font-weight: 500;
font-size: 40rpx;
}
&--text {
font-size: 24rpx;
}
}
}
.tab {
display: flex;
align-items: center;
padding: 0 60rpx;
margin-top: 38rpx;
&-item {
font-size: 28rpx;
color: #666;
transition: all .1s;
}
.tab-item + .tab-item {
margin-left: 60rpx;
}
.is-active {
color: #000;
font-weight: 600;
font-size: 32rpx;
position: relative;
&::after {
content: '';
position: absolute;
bottom: -20rpx;
left: 50%;
transform: translateX(-50%);
width: 58rpx;
height: 4rpx;
border-radius: 2rpx;
background-color: #ca2328;
}
}
}
.for-people {
margin: 54rpx 24rpx 0;
padding: 46rpx 30rpx;
&__title {
display: inline-block;
font-size: 28rpx;
color: #ca2328;
font-weight: bold;
position: relative;
left: 50%;
transform: translateX(-50%);
&::before {
content: '';
position: absolute;
width: 139rpx;
height: 5rpx;
border-radius: 3px;
left: -28rpx;
top: 50%;
transform: translate(-100%, -50%);
background: linear-gradient(to left,#ca2328,#ffffff00);
}
&::after {
content: '';
position: absolute;
width: 139rpx;
height: 5rpx;
border-radius: 3px;
right: -28rpx;
top: 50%;
transform: translate(100%, -50%);
background: linear-gradient(to right,#ca2328,#ffffff00);
}
}
&__content {
margin-top: 46rpx;
}
}
}
}
</style>

@ -0,0 +1,165 @@
<template>
<view class="page">
<view class="top">
<view class="position" @click="isShowCity = true">
<u-icon name="map-fill"></u-icon>
<text>苏州</text>
<u-icon name="arrow-down" size="22"></u-icon>
</view>
</view>
<view class="container">
<image class="bkg" src="~@/package_sub/static/ServiceList/bkg.png" mode="aspectFill"></image>
<view class="list">
<view class="list-item" v-for="(i) in 20" :key="i">
<view class="left">
<view class="list-item__icon">
<u-icon name="integral" size="60"></u-icon>
</view>
</view>
<view class="center">
<view class="list-item__title">
尊享VIP陪诊
</view>
<view class="list-item__sub-title">尊享VIP体验车接车送</view>
<view class="list-item__price">
<text class="list-item__price--unit">¥</text>
<text class="list-item__price--number">600</text>
<text class="list-item__price--text">/</text>
</view>
</view>
<view class="right">
<u-button shape="circle" ripple :custom-style="orderBtnStyle">预约</u-button>
</view>
</view>
</view>
</view>
<u-picker v-model="isShowCity" mode="region"></u-picker>
</view>
</template>
<script>
export default {
data() {
return {
orderBtnStyle: {
'background-image': 'linear-gradient(-90deg, #e26165 0%, #c10d12 94%, #c10d12 100%)',
'font-weight': '500',
'font-size': '27rpx',
'color': '#fff',
'width': '130rpx',
'height': '60rpx',
'line-height': '60rpx'
},
isShowCity: false
};
}
}
</script>
<style lang="scss">
.page {
position: relative;
}
.top {
width: 100vw;
background: #fff;
padding: 26rpx 28rpx;
z-index: 4;
position: sticky;
top: 0;
.position {
color: #000;
font-size: 30rpx;
letter-spacing: 3rpx;
font-weight: 500;
& > text {
padding: 0 13rpx;
}
}
}
.container {
padding-bottom: 20rpx;
padding-bottom: calc(constant(safe-area-inset-bottom) + 20rpx);
padding-bottom: calc(env(safe-area-inset-bottom) + 20rpx);
position: relative;
z-index: 1;
.bkg {
height: 316rpx;
width: 100vw;
position: absolute;
}
.list {
padding: 252rpx 25rpx 20rpx;
position: relative;
z-index: 3;
&-item {
border-radius: 10rpx;
filter: drop-shadow(2.192rpx 4.494rpx 5rpx rgba(33,32,32,0.15));
background-color: #ffffff;
display: flex;
align-items: center;
padding: 34rpx 45rpx 34rpx 26rpx;
&__icon {
background-color: #f9f5e9;
height: 128rpx;
width: 152rpx;
display: flex;
align-items: center;
justify-content: center;
}
.center {
flex: 1;
margin-left: 18rpx;
}
.right {
margin-left: 12rpx;
}
&__title {
max-width: 300rpx;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
font-size: 28rpx;
color: #000;
font-weight: bold;
}
&__sub-title {
padding-top: 20rpx;
font-size: 22rpx;
color: #929196;
font-weight: 500;
max-width: 304rpx;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
&__price {
padding-top: 16rpx;
color: #c20d12;
font-size: 22rpx;
&--unit {
}
&--number {
font-size: 36rpx;
font-weight: 500;
}
}
}
.list-item + .list-item {
margin-top: 28rpx;
}
}
}
</style>

@ -1,25 +0,0 @@
<template>
<view class="content">
分包的页面
</view>
</template>
<script>
export default {
data() {
return {
}
},
onLoad() {
},
methods: {
}
}
</script>
<style lang="scss">
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

@ -1,80 +1,90 @@
{
"easycom": {
"^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue"
},
"pages": [
{
"path": "pages/index/index",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/order/order",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": true
}
},
{
"path": "pages/me/me",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": true
}
},
{
"path": "component/Tabbar/Tabbar",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": true
}
}
],
"subPackages": [
{
"root": "package_sub",
"pages": [
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "分包页面sub_index"
}
}
]
}
],
"preloadRule": {
"package_sub/pages/index/index": {
"network": "all",
"packages": [
"__APP__"
]
}
},
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
},
"tabBar": {
"list": [
{
"pagePath": "pages/index/index",
"text": "首页"
},
{
"pagePath": "pages/order/order",
"text": "订单"
},
{
"pagePath": "pages/me/me",
"text": "我的"
}
],
"color": "",
"selectedColor": "",
"backgroundColor": ""
}
"easycom": {
"^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue"
},
"pages": [
{
"path": "pages/index/index",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/order/order",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": true
}
},
{
"path": "pages/me/me",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": true
}
},
{
"path": "component/Tabbar/Tabbar",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": true
}
}
],
"subPackages": [
{
"root": "package_sub",
"pages": [
{
"path": "pages/AddOrder/AddOrder",
"style": {
"navigationBarTitleText": "预约陪诊"
}
},
{
"path": "pages/ServiceList/ServiceList",
"style": {
"navigationBarTitleText": "服务列表",
"enablePullDownRefresh": true
}
},
{
"path": "pages/ServiceDetail/ServiceDetail",
"style": {
"navigationBarTitleText": "服务项目",
"enablePullDownRefresh": true
}
}
]
}
],
"preloadRule": {},
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
},
"tabBar": {
"list": [
{
"pagePath": "pages/index/index",
"text": "首页",
"myIconPath": "/static/tabbar/home.svg"
},
{
"pagePath": "pages/order/order",
"text": "订单",
"myIconPath": "/static/tabbar/order.svg"
},
{
"pagePath": "pages/me/me",
"text": "我的",
"myIconPath": "/static/tabbar/me.svg"
}
],
"color": "",
"selectedColor": "",
"backgroundColor": ""
}
}

@ -4,17 +4,17 @@
<image
mode="aspectFill"
class="top-bkg"
src="/static/index/top-bkg.png"
src="~@/static/index/top-bkg.png"
alt=""
></image>
<view class="top" :style="{ 'padding-right': menuButtonRight + 'px' }">
<view class="position">
<view class="position" @click="isShowCity = true">
<u-icon name="map-fill"></u-icon>
<text>苏州</text>
<u-icon name="arrow-down" size="22"></u-icon>
</view>
<view class="icon">
<image src="/static/index/icon.png" mode="aspectFit" alt=""></image>
<image src="~@/static/index/icon.png" mode="aspectFit" alt=""></image>
</view>
</view>
@ -34,6 +34,26 @@
</view>
</view>
<view v-if="isShowSticky" class="search-sticky" :style="{ 'padding-top': statusBarHeight + 'px','padding-right': menuButtonRight + 'px' }">
<view class="search-sticky__position" @click="isShowCity = true">
<u-icon name="map-fill"></u-icon>
<text>苏州</text>
<u-icon name="arrow-down" size="22"></u-icon>
</view>
<view class="search-sticky__search">
<view class="search-sticky__search--content">
<u-input
:clearable="false"
:value="select.keyword"
placeholder="请输入要搜索的内容"
height="46"
@input="searchInput"
></u-input>
</view>
</view>
</view>
<view class="swiper">
<u-swiper :list="list"></u-swiper>
</view>
@ -52,7 +72,7 @@
</view>
<view class="img1">
<image src="/static/index/ask-png.png" alt="" mode="aspectFit"></image>
<image src="~@/static/index/ask-png.png" alt="" mode="aspectFit"></image>
</view>
<view class="hospitals">
@ -80,12 +100,12 @@
</view>
<view class="statistics">
<view class="block1">
<view class="block1" @click="toPage('/package_sub/pages/AddOrder/AddOrder')">
<view class="text1">陪诊团队介绍</view>
<view class="text2">让就医体验更美好</view>
<view class="order">预约陪诊</view>
<image class="img" src="/static/index/block1.png" mode="aspectFit" alt=""></image>
<image class="img" src="~@/static/index/block1.png" mode="aspectFit" alt=""></image>
</view>
<view class="block2">
<view class="text1">
@ -93,7 +113,7 @@
</view>
<view class="text2">医院陪护累计</view>
<image class="img" src="/static/index/block2.png" mode="aspectFit" alt=""></image>
<image class="img" src="~@/static/index/block2.png" mode="aspectFit" alt=""></image>
</view>
<view class="block3">
<view class="text1">
@ -101,18 +121,18 @@
</view>
<view class="text2">居家照护累计</view>
<image class="img" src="/static/index/block3.png" mode="aspectFit" alt=""></image>
<image class="img" src="~@/static/index/block3.png" mode="aspectFit" alt=""></image>
</view>
<view class="block4">
<view class="text1">关于我们</view>
<image class="img" src="/static/index/block4.png" mode="aspectFit" alt=""></image>
<image class="img" src="~@/static/index/block4.png" mode="aspectFit" alt=""></image>
</view>
</view>
<view class="honor">
<view class="honor__title">
<image src="/static/index/honor-title.png" alt="" mode="aspectFit"></image>
<image src="~@/static/index/honor-title.png" alt="" mode="aspectFit"></image>
<text>资质荣誉</text>
</view>
@ -121,9 +141,11 @@
</scroll-view>
</view>
<image class="bottom" src="/static/index/bottom.png" mode="aspectFit" alt=""></image>
<image class="bottom" src="~@/static/index/bottom.png" mode="aspectFit" alt=""></image>
</view>
<u-picker v-model="isShowCity" mode="region"></u-picker>
<tabbar />
</view>
</template>
@ -136,6 +158,8 @@ export default {
},
data() {
return {
isShowSticky: false,
scrollTop: 308,
statusBarHeight: 40,
menuButtonRight: 0,
@ -183,8 +207,13 @@ export default {
icon: "/static/index/shangchengfuwu.png",
},
],
isShowCity: false,
};
},
mounted() {
this.getElScrollTop()
},
created() {
this.menuButtonRight =
uni.getSystemInfoSync().screenWidth -
@ -192,9 +221,38 @@ export default {
10;
this.statusBarHeight = uni.getMenuButtonBoundingClientRect().top;
},
onPageScroll(e) {
this.isShowSticky = e.scrollTop > this.scrollTop
},
onLoad() {},
methods: {
getElScrollTop () {
const query = uni.createSelectorQuery().in(this)
query.select('.links').boundingClientRect(data => {
if (data) {
this.scrollTop = data.top
}
}).exec()
},
searchInput(e) {},
toPage (url, type='page') {
switch (type) {
case 'page':
uni.navigateTo({
url
})
break
case 'tabbar':
uni.switchTab({
url
})
break
case 'back':
uni.navigateBack()
break
}
}
},
};
</script>
@ -266,6 +324,52 @@ export default {
&__icon {
}
}
.search-sticky {
display: flex;
align-items: center;
background: url("~@/static/index/top-bkg.png") no-repeat;
background-size: cover;
position: sticky;
z-index: 5;
top: 0;
width: 100vw;
padding-bottom: 20rpx;
animation: fade .4s;
filter: drop-shadow(0 2rpx 6rpx #c20d1266);
@keyframes fade {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
&__position {
flex: 0;
color: #fff;
font-size: 30rpx;
letter-spacing: 3rpx;
font-weight: 500;
white-space: nowrap;
padding: 0 10rpx;
& > text {
padding: 0 10rpx;
}
}
&__search {
flex: 1;
height: 64rpx;
border-radius: 34rpx;
background: #ffffff;
display: flex;
align-items: center;
position: relative;
padding: 20rpx 25rpx;
}
}
.swiper {
margin-top: 24rpx;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 349 B

Loading…
Cancel
Save