购物车地址 跳转陪护

master
lion 1 year ago
parent 4245b40401
commit 3023b2ec0b

@ -385,13 +385,13 @@ export default {
} catch (err) {}
},
pay() {
// if (this.pickCart.length <= 0) {
// this.$refs.uToast.show({
// title: "",
// type: "warning",
// });
// return
// }
if (this.carts.length <= 0) {
this.$refs.uToast.show({
title: "请选择下单商品",
type: "warning",
});
return
}
this.$u.route({
url: '/package_sub/pages/Shop/Pay',
params: {

@ -185,7 +185,7 @@
safe-area-inset-bottom
>
<view class="content">
<scroll-view scroll-y="true" style="height: 800rpx">
<scroll-view scroll-y="true" style="height: 750rpx;padding-bottom:40rpx">
<view
class="site"
v-for="item in sites"
@ -211,10 +211,19 @@
</view>
</view>
</scroll-view>
<u-button
v-if="!detail.id"
shape="circle"
ripple
:custom-style="btnStyle"
@click="goAddress"
>新建收货地址</u-button
>
</view>
</u-popup>
<tabbar class="tabbar"></tabbar>
<u-toast ref="uToast" />
</view>
</template>
@ -267,6 +276,13 @@ export default {
}
},
async submit() {
if(!this.site){
this.$refs.uToast.show({
title: "请选择收货地址",
type: "warning",
});
return
}
if (!this.site.id) {
this.$refs.uToast.show({
title: "请选择收货地址",
@ -347,6 +363,11 @@ export default {
console.error(err)
}
},
goAddress(){
uni.navigateTo({
url:'/package_sub/pages/UserAddress/AddUserAddress?type=car'
})
},
async refund() {
try {
uni.showModal({
@ -378,7 +399,10 @@ export default {
}
},
created() {
this.getSites();
// this.getSites();
},
onShow() {
this.getSites()
},
onLoad(option) {
if (option.order_id) {

@ -80,6 +80,7 @@ export default {
address: '',
is_default: 0
},
type:''
};
},
methods: {
@ -137,6 +138,7 @@ export default {
})
return
}
let that = this
try {
await this.$u.api.userAddressSave(this.form)
this.$refs.uToast.show({
@ -153,6 +155,7 @@ export default {
if(option.id) {
this.getDetail(option.id)
}
this.type = options.type?options.type:''
}
};
</script>

@ -1,25 +1,17 @@
<template>
<view>
<view class="container" :style="{ 'padding-top': statusBarHeight + 'px' }">
<image
mode="aspectFill"
class="top-bkg"
src="~@/static/index/top-bkg.png"
alt=""
></image>
<image mode="aspectFill" class="top-bkg" src="~@/static/index/top-bkg.png" alt=""></image>
<view class="top" :style="{ 'padding-right': menuButtonRight + 'px' }">
<view
class="position"
@click="isShowSite = true"
>
<view class="position" @click="isShowSite = true">
<u-icon name="map-fill"></u-icon>
<view>{{ vuex_site.name }}</view>
<!-- <view>{{ vuex_location.city.replace(/(市|区|县)/, "") }}</view>-->
<!-- <view>{{ vuex_location.city.replace(/(市|区|县)/, "") }}</view>-->
<u-icon name="arrow-down" size="22"></u-icon>
</view>
<view class="icon">
<text style="color:#fff;font-size: 28rpx;font-weight: 500;letter-spacing: 2rpx;">四世同堂整合照护平台</text>
<!-- <image src="~@/static/index/icon.png" mode="aspectFit" alt=""></image>-->
<!-- <image src="~@/static/index/icon.png" mode="aspectFit" alt=""></image>-->
</view>
</view>
@ -28,41 +20,26 @@
<u-icon name="search" size="50" color="#999"></u-icon>
</view>
<view class="search__content">
<u-input
:clearable="false"
:value="select.keyword"
placeholder="请输入要搜索的内容"
height="56"
:custom-style="inputStyle"
@input="searchInput"
></u-input>
<u-input :clearable="false" :value="select.keyword" placeholder="请输入要搜索的内容" height="56"
:custom-style="inputStyle" @input="searchInput"></u-input>
</view>
</view>
<view
v-if="isShowSticky"
class="search-sticky"
:style="{
<view v-if="isShowSticky" class="search-sticky" :style="{
'padding-top': statusBarHeight + 'px',
'padding-right': menuButtonRight + 'px',
}"
>
}">
<view class="search-sticky__position" @click="isShowSite = true">
<u-icon name="map-fill"></u-icon>
<view>{{ vuex_site.name }}</view>
<!-- <view>{{ vuex_location.city.replace(/(市|区|县)/, "") }}</view>-->
<!-- <view>{{ vuex_location.city.replace(/(市|区|县)/, "") }}</view>-->
<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>
<u-input :clearable="false" :value="select.keyword" placeholder="请输入要搜索的内容" height="46"
@input="searchInput"></u-input>
</view>
</view>
</view>
@ -73,18 +50,7 @@
<view class="links">
<u-grid :col="5" :border="false">
<u-grid-item
v-for="item in links"
:key="item.text"
bg-color="transparent"
@click="
$u.throttle(
$u.route({
url: item.to,
})
)
"
>
<u-grid-item v-for="item in links" :key="item.text" bg-color="transparent" @click="goLinks(item)">
<image class="icon" :src="item.icon" mode="aspectFit"></image>
<view class="text">{{ item.text }}</view>
</u-grid-item>
@ -92,28 +58,16 @@
</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">
<view class="hospitals__title">热门医院</view>
<view class="hospitals__content">
<view
class="hospitals__content__item"
v-for="(item, index) in hospitals"
:key="item.id"
>
<view class="hospitals__content__item" v-for="(item, index) in hospitals" :key="item.id">
<view class="left">
<image
:src="item.cover ? item.cover.url : ''"
alt=""
mode="scaleToFill"
></image>
<image :src="item.cover ? item.cover.url : ''" alt="" mode="scaleToFill"></image>
</view>
<view class="right">
<view class="title">{{ item.name }}</view>
@ -127,90 +81,52 @@
</view>
<view class="statistics">
<view
class="block1"
@click="$u.throttle($u.route({
<view class="block1" @click="$u.throttle($u.route({
url: '/package_sub/pages/ServiceList/ServiceList',
params: {
type: 1
}
}))"
>
}))">
<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"> <text>142812</text><text>人次</text> </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"> <text>12456</text><text>人次</text> </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>
<scroll-view class="scroll-content" scroll-x="true">
<image
class="images"
v-for="i in photos"
:key="i.id"
:src="i.image ? i.image.url : ''"
mode="aspectFit"
></image>
<image class="images" v-for="i in photos" :key="i.id" :src="i.image ? i.image.url : ''"
mode="aspectFit"></image>
</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 class="ai"
@click="$u.throttle(
<view class="ai" @click="$u.throttle(
$u.route({
url: '/pages/aichat/index',
})
@ -220,10 +136,7 @@
</view>
<!-- 选择站点 -->
<u-select v-model="isShowSite"
value-name="id"
@confirm="confirmSite"
label-name="name"
<u-select v-model="isShowSite" value-name="id" @confirm="confirmSite" label-name="name"
:list="list_site"></u-select>
<u-top-tips :navbar-height="navbarHeight" ref="uTips"></u-top-tips>
@ -234,10 +147,10 @@
</template>
<script>
import Tabbar from "@/component/Tabbar/Tabbar.vue";
import PrivacyPopup from "@/component/privacy-popup/privacy-popup.vue";
import Tabbar from "@/component/Tabbar/Tabbar.vue";
import PrivacyPopup from "@/component/privacy-popup/privacy-popup.vue";
export default {
export default {
components: {
Tabbar,
PrivacyPopup,
@ -263,8 +176,7 @@ export default {
select: {
keyword: "",
},
links: [
{
links: [{
text: "陪诊服务",
icon: "/static/index/peizhenfuwu.png",
to: "/package_sub/pages/ServiceList/ServiceList?type=1",
@ -282,6 +194,7 @@ export default {
{
text: "医院陪护",
icon: "/static/index/yiyuanpeihu.png",
appid: 'wx0fee3573c1bb5ca8'
},
{
text: "商城服务",
@ -350,6 +263,22 @@ export default {
this.getBanner()
this.getPhotos()
},
goLinks(item) {
if (item.to) {
this.$u.throttle(
this.$u.route({
url: item.to,
})
)
}
if (item.appid) {
uni.navigateToMiniProgram({
appId: item.appid,
});
}
},
async getHospital() {
try {
const res = await this.$u.api.hospitalList({
@ -383,21 +312,23 @@ export default {
} catch (err) {}
},
},
};
};
</script>
<style scoped lang="scss">
::v-deep .u-swiper-wrap {
::v-deep .u-swiper-wrap {
overflow: inherit !important;
}
::v-deep .u-swiper-indicator {
}
::v-deep .u-swiper-indicator {
bottom: -30rpx !important;
}
::v-deep .u-indicator-item-round-active {
}
::v-deep .u-indicator-item-round-active {
background: #ca2328 !important;
}
}
.container {
.container {
padding-bottom: calc(76px + 34px + 10px);
position: relative;
@ -425,7 +356,7 @@ export default {
display: flex;
align-items: center;
& > view {
&>view {
padding: 0 13rpx;
max-width: 160rpx;
white-space: nowrap;
@ -433,14 +364,16 @@ export default {
overflow: hidden;
}
}
.icon {
& > image {
&>image {
width: 197rpx;
height: 72rpx;
object-fit: contain;
}
}
}
.search {
height: 68rpx;
border-radius: 34rpx;
@ -456,9 +389,9 @@ export default {
margin-left: 18rpx;
}
&__icon {
}
&__icon {}
}
.search-sticky {
display: flex;
align-items: center;
@ -471,10 +404,12 @@ export default {
padding-bottom: 20rpx;
animation: fade 0.4s;
filter: drop-shadow(0 2rpx 6rpx #c20d1266);
@keyframes fade {
from {
opacity: 0;
}
to {
opacity: 1;
}
@ -491,7 +426,7 @@ export default {
display: flex;
align-items: center;
& > view {
&>view {
padding: 0 10rpx;
max-width: 160rpx;
white-space: nowrap;
@ -499,6 +434,7 @@ export default {
overflow: hidden;
}
}
&__search {
flex: 1;
height: 64rpx;
@ -525,6 +461,7 @@ export default {
height: 59rpx;
width: 67rpx;
}
.text {
font-size: 24rpx;
line-height: 16rpx;
@ -538,7 +475,7 @@ export default {
margin-top: 26rpx;
padding: 0 25rpx;
& > image {
&>image {
width: 700rpx;
height: 169rpx;
}
@ -556,6 +493,7 @@ export default {
font-weight: bold;
padding: 0 32rpx 28rpx;
}
&__content {
max-height: 516rpx;
overflow-y: scroll;
@ -565,19 +503,22 @@ export default {
align-items: center;
.left {
& > image {
&>image {
height: 162rpx;
width: 250rpx;
border-radius: 6rpx;
}
}
.right {
margin-left: 25rpx;
.title {
font-size: 28rpx;
color: #000000;
font-weight: bold;
}
.tag {
margin-top: 16rpx;
display: flex;
@ -593,15 +534,18 @@ export default {
color: #ca2328;
background-color: #faefef;
}
&:nth-child(2) {
color: #f38628;
background-color: #fcf3e9;
}
}
.tag__item + .tag__item {
.tag__item+.tag__item {
margin-left: 12rpx;
}
}
.description {
max-width: 320rpx;
white-space: nowrap;
@ -633,13 +577,12 @@ export default {
grid-area: block#{$index};
}
}
.block1 {
background: linear-gradient(
-90deg,
background: linear-gradient(-90deg,
#e26165 0%,
#c10d12 94%,
#c10d12 100%
);
#c10d12 100%);
position: relative;
.text1 {
@ -648,12 +591,14 @@ export default {
font-weight: bold;
font-size: 28rpx;
}
.text2 {
font-size: 18rpx;
color: #ffffff;
font-weight: 500;
padding: 17rpx 0 0 34rpx;
}
.order {
font-size: 24rpx;
color: #c20d12;
@ -664,6 +609,7 @@ export default {
display: inline-block;
margin: 18rpx 0 0 34rpx;
}
.img {
height: 190rpx;
width: 152rpx;
@ -672,6 +618,7 @@ export default {
bottom: 10rpx;
}
}
.block2 {
position: relative;
background: linear-gradient(to bottom, #f3d4d4, #f2edf0);
@ -685,12 +632,14 @@ export default {
color: #ca3831;
font-weight: bold;
}
text:nth-child(2) {
font-size: 18rpx;
color: #929196;
font-weight: 500;
}
}
.text2 {
font-size: 24rpx;
color: #202020;
@ -707,6 +656,7 @@ export default {
bottom: 20rpx;
}
}
.block3 {
position: relative;
background: linear-gradient(to bottom, #f7e9dd, #f4f1f1);
@ -727,6 +677,7 @@ export default {
font-weight: 500;
}
}
.text2 {
font-size: 24rpx;
color: #202020;
@ -734,6 +685,7 @@ export default {
padding-top: 20rpx;
text-align: center;
}
.img {
width: 123rpx;
height: 127rpx;
@ -742,6 +694,7 @@ export default {
bottom: 20rpx;
}
}
.block4 {
position: relative;
background: #dee5f9;
@ -755,6 +708,7 @@ export default {
top: 50%;
transform: translateY(-50%);
}
.img {
position: absolute;
width: 147rpx;
@ -775,16 +729,18 @@ export default {
display: flex;
align-items: center;
& > image {
&>image {
width: 31rpx;
height: 36rpx;
}
& > text {
&>text {
font-size: 28rpx;
color: #000000;
font-weight: bold;
}
}
.scroll-content {
margin-top: 27rpx;
white-space: nowrap;
@ -815,5 +771,5 @@ export default {
height: 120rpx;
}
}
}
}
</style>
Loading…
Cancel
Save