刘翔宇-旅管家 3 years ago
parent ef8fa245f6
commit 9110b2ba12

BIN
.DS_Store vendored

Binary file not shown.

@ -1,11 +1,11 @@
export const appConfig = {
appId: 'wx9b4762770771d98a', //孕育
appId: 'wx9b4762770771d98a', //孕育
//appId:"wx3dc65ce9b588727a",//孕育咨询
//baseUrl: 'http://yunyubang.localhost.com',
baseUrl: 'https://yunyubang2021.langye.net', //孕育
baseUrl: 'https://yunyubang2021.langye.net', //孕育
//baseUrl: 'http://yybtest.ali251.langye.net',
newBaseUrl: 'https://yunyubang.ali251.langye.net',
//newBaseUrl: 'http://yybtest.ali251.langye.net',
//baseUrl:'https://yybtest2021.langye.net',//孕育咨询
openidInfoKey: 'openid_info_yunyubang'
}
}

File diff suppressed because it is too large Load Diff

@ -1,401 +1,562 @@
<template>
<view>
<view class="u-skeleton">
<view class="product-picture u-skeleton-rect">
<swiper class="product-picture-swiper" :indicator-dots="true"
@change="e => swiperIndex = e.detail.current + 1">
<swiper-item v-for="(img,index) in detail.confinement_picture" :key="index">
<u-image height="100%" width="100%" :src="img.picture" mode="aspectFit">
</u-image>
</swiper-item>
</swiper>
<view class="product-picture-num">
{{swiperIndex}} / {{detail.confinement_picture.length}}
</view>
</view>
<view class="product-price u-skeleton-rect">
<span style="font-size: 34rpx;">{{detail.price}}</span>
</view>
<view class="product-info">
<view class="product-info-name u-skeleton-rect">
{{detail.name}}
</view>
<view class="product-info-label ">
<view class="product-info-label-item"
v-for="(item,index) in featuredLabelSplit(detail.featured_label)" :key="index">
{{item}}
</view>
</view>
<view class="product-info-shop u-skeleton-fillet">
<view class="product-info-shop-top">
<view class="product-info-shop-top-img">
<u-image :src="detail.service.cover_picture" width="100" height="100" border-radius="100%">
</u-image>
</view>
<view class="product-info-shop-top-name">
<view>{{detail.service.name}}</view>
<view>{{detail.service.subheading}}</view>
</view>
<view class="product-info-shop-top-more" @click="toService(detail.service.id)">
<text>更多</text>
<u-icon name="arrow-right" size="25" color="#A0A0A0"></u-icon>
</view>
</view>
<view class="product-info-shop-bottom">
<view class="product-info-shop-bottom-icon">
<u-image mode="asseptFit" src="/packages/packageCarecenter/static/position.png" height="26"
width="22">
</u-image>
</view>
<view class="product-info-shop-bottom-text">
{{detail.service.address}}
</view>
<view class="product-info-shop-bottom-arrow" @click="toMap">
<u-icon name="arrow-right" size="25" color="#A0A0A0"></u-icon>
</view>
</view>
</view>
</view>
<view class="combo u-skeleton-rect">
<view class="combo-title">
套餐介绍
</view>
<view class="combo-content">
<view class="combo-content-item" v-for="(item,index) in detail.set" :key="index">
<view class="combo-content-item-name">{{item.content}}</view>
<view class="combo-content-item-content">{{item.name}}</view>
</view>
</view>
</view>
<view class="facility u-skeleton-rect">
<view class="facility-title">
设备详情
</view>
<view class="facility-content">
<view class="facility-content-item" v-for="(item,index) in detail.facility" :key="index">
<view class="facility-content-item-icon iconfont" :class="'icon-'+item.remark"></view>
<view class="facility-content-item-name">{{item.value}}</view>
</view>
</view>
</view>
<view style="width: 100%;background: #fff;padding: 20rpx 28rpx;">
<u-parse :html="detail.content"></u-parse>
</view>
</view>
<u-skeleton :loading="loading" :animation="true" bgColor="#FFF"></u-skeleton>
</view>
</template>
<script>
import {
weixin
} from '@/utils/weixin.js'
export default {
data() {
return {
loading: true,
swiperIndex: 1,
detail: {},
}
},
methods: {
toMap() {
this.$u.throttle(() => {
uni.openLocation({
latitude: Number(this.detail.service.latitude),
longitude: Number(this.detail.service.longitude),
name: this.detail.name
})
})
},
toService(id) {
this.$u.throttle(() => {
uni.navigateTo({
url: `/packages/packageCarecenter/pages/careCenter/serviceDetail?id=${id}`
})
})
},
featuredLabelSplit(res) {
if (res) {
return res.split(",")
}
return []
},
getProductDetail(id) {
weixin.request({
newUrl: true,
api: '/api/member/get-confinement-product-item',
data: {
id
},
utilSuccess: (res) => {
this.detail = res
this.loading = false
console.log(res);
}
})
}
},
computed: {
},
onLoad(option) {
this.getProductDetail(option.id)
}
}
</script>
<style scoped lang="scss">
.product-picture {
height: 417rpx;
width: 100%;
position: relative;
&-swiper {
width: 100%;
height: 100%;
}
&-num {
color: #fff;
background: #252526;
border-radius: 16rpx;
opacity: 0.3;
padding: 7rpx 20rpx;
position: absolute;
bottom: 20rpx;
right: 27rpx;
}
}
.product-price {
font-weight: 400;
color: #FF578A;
font-size: 24rpx;
background-color: #FFEFF4;
padding: 55rpx 21rpx;
}
.product-info {
background: #fff;
padding-bottom: 41rpx;
&-name {
font-weight: 400;
color: #333333;
font-size: 34rpx;
padding: 46rpx 34rpx 0 34rpx;
}
&-label {
display: flex;
flex-wrap: wrap;
margin-top: 21rpx;
padding: 0 32rpx;
&-item {
background: rgba(255, 87, 138, 0.1);
border-radius: 12rpx;
font-weight: 400;
color: #FF578A;
font-size: 24rpx;
padding: 10rpx 15rpx;
margin-right: 15rpx;
}
}
&-shop {
background: linear-gradient(180deg, #555455 0%, #1F1D1D 100%);
border-radius: 40rpx;
margin: 35rpx 30rpx 0 30rpx;
padding: 0 30rpx 0 36rpx;
&-top {
display: flex;
align-items: center;
padding-top: 23rpx;
&-img {}
&-name {
color: #fff;
flex: 1;
margin-left: 20rpx;
&>view:nth-child(1) {
font-weight: 400;
color: #FFFFFF;
font-size: 30rpx;
}
&>view:nth-child(2) {
display: inline-block;
text-align: center;
border-radius: 12rpx;
font-size: 24rpx;
font-weight: 400;
color: #FFFFFF;
background-color: #FF578A;
padding: 4rpx 11rpx;
margin-top: 10rpx;
}
}
&-more {
font-size: 24rpx;
color: #A0A0A0;
font-weight: 400;
align-self: flex-start;
padding-right: 26rpx;
padding-top: 6rpx;
}
}
&-bottom {
display: flex;
align-items: flex-start;
padding-right: 26rpx;
padding-left: 8rpx;
padding-bottom: 42rpx;
margin-top: 37rpx;
&-text {
flex: 1;
font-weight: 400;
color: #FFFFFF;
font-size: 24rpx;
padding: 0 23rpx 0 10rpx;
}
}
}
}
.combo {
background-color: #fff;
margin-top: 34rpx;
padding: 0 28rpx;
&-title {
font-size: 34rpx;
font-weight: 400;
color: #333333;
padding-top: 51rpx;
padding-left: 6rpx;
padding-bottom: 55rpx;
}
&-content {
display: flex;
flex-wrap: wrap;
&>view:nth-last-child(1) {
margin-right: 0;
}
&-item {
text-align: center;
border: 1px solid #191B1A;
border-radius: 24rpx;
flex: 0;
height: 135rpx;
margin-right: 14rpx;
margin-bottom: 12rpx;
&-name {
font-size: 30rpx;
font-weight: 400;
color: #333333;
white-space: nowrap;
word-wrap: keep-all;
padding: 27rpx 24rpx 18rpx 24rpx;
}
&-content {
background-color: #191B1A;
color: #fff;
border-radius: 0 0 24rpx 24rpx;
white-space: nowrap;
word-wrap: keep-all;
padding: 8rpx 24rpx;
}
}
}
}
.facility {
background-color: #fff;
&-title {
padding: 73rpx 0 44rpx 34rpx;
font-weight: 400;
color: #333333;
font-size: 34rpx;
}
&-content {
display: flex;
flex-wrap: wrap;
padding: 44rpx 64rpx 66rpx 64rpx;
&-item {
flex-basis: 25%;
font-size: 24rpx;
font-weight: 400;
color: #333333;
text-align: center;
margin-bottom: 24rpx;
&-icon {
width: 55rpx;
height: 55rpx;
font-size: 55rpx;
margin: auto;
}
&-name {
padding-top: 13rpx;
}
}
}
}
::v-deep .u-image__image {
display: block !important;
}
<template>
<view>
<view class="u-skeleton">
<view class="product-picture u-skeleton-rect">
<video style="width: 100%;" v-if="showFlag === 0" :src="detail.video"
play-btn-position="center"></video>
<swiper class="product-picture-swiper" :indicator-dots="true"
@change="e => swiperIndex = e.detail.current + 1" v-if="showFlag === 1">
<swiper-item v-for="(img,index) in detail.confinement_picture" :key="index">
<u-image height="100%" width="100%" :src="img.picture" mode="aspectFit">
</u-image>
</swiper-item>
</swiper>
<view class="service-show-btn">
<view class="service-show-btn-img" @click="showFlag = 1">
<image src="../../static/pic.png">
</image>
<view class="service-show-btn-img__num">{{detail.confinement_picture.length}}</view>
</view>
<view class="service-show-btn-video" v-if="detail.video" @click="showFlag = 0">
<image src="../../static/video.png">
</image>
<view class="service-show-btn-img__num">1</view>
</view>
</view>
</view>
<view class="product-price u-skeleton-rect">
<span style="font-size: 34rpx;">{{detail.price}}</span>
</view>
<view class="product-info">
<view class="product-info-name u-skeleton-rect">
{{detail.name}}
</view>
<view class="product-info-label ">
<view class="product-info-label-item"
v-for="(item,index) in featuredLabelSplit(detail.featured_label)" :key="index">
{{item}}
</view>
</view>
<view class="product-info-shop u-skeleton-fillet">
<view class="product-info-shop-top">
<view class="product-info-shop-top-img">
<u-image :src="detail.service.cover_picture" width="100" height="100" border-radius="100%">
</u-image>
</view>
<view class="product-info-shop-top-name">
<view>{{detail.service.name}}</view>
<view>{{detail.service.subheading}}</view>
</view>
<view class="product-info-shop-top-more" @click="toService(detail.service.id)">
<text>更多</text>
<u-icon name="arrow-right" size="25" color="#A0A0A0"></u-icon>
</view>
</view>
<view class="product-info-shop-bottom">
<view class="product-info-shop-bottom-icon">
<u-image mode="asseptFit" src="/packages/packageCarecenter/static/position.png" height="26"
width="22">
</u-image>
</view>
<view class="product-info-shop-bottom-text">
{{detail.service.address}}
</view>
<view class="product-info-shop-bottom-arrow" @click="toMap">
<u-icon name="arrow-right" size="25" color="#A0A0A0"></u-icon>
</view>
</view>
</view>
</view>
<view class="service-baseinfo-center-store u-skeleton-fillet">
<video :src="detail.video" v-if="detail.video" style="width: 100%;"
play-btn-position="center"></video>
<u-image :src="detail.cover_picture" v-else mode="aspectFill" height="397" width="100%"
border-radius="30" @load="$u.debounce(init,100)">
</u-image>
<view class="service-baseinfo-center-store-tag">
<image src="/packages/packageCarecenter/static/huangguan.png"></image>
<view class="service-baseinfo-center-store-tag-text">
孕育邦探店
</view>
</view>
</view>
<view class="combo u-skeleton-rect">
<view class="combo-title">
套餐介绍
</view>
<view class="combo-content">
<view class="combo-content-item" v-for="(item,index) in detail.set" :key="index">
<view class="combo-content-item-name">{{item.content}}</view>
<view class="combo-content-item-content">{{item.name}}</view>
</view>
</view>
</view>
<view class="facility u-skeleton-rect">
<view class="facility-title">
设备详情
</view>
<view class="facility-content">
<view class="facility-content-item" v-for="(item,index) in detail.facility" :key="index">
<view class="facility-content-item-icon iconfont" :class="'icon-'+item.remark"></view>
<view class="facility-content-item-name">{{item.value}}</view>
</view>
</view>
</view>
<view style="width: 100%;background: #fff;padding: 20rpx 28rpx;">
<u-parse :html="detail.content"></u-parse>
</view>
</view>
<u-skeleton :loading="loading" :animation="true" bgColor="#FFF"></u-skeleton>
</view>
</template>
<script>
import {
weixin
} from '@/utils/weixin.js'
export default {
data() {
return {
showFlag: 1,
loading: true,
swiperIndex: 1,
detail: {},
}
},
methods: {
toMap() {
this.$u.throttle(() => {
uni.openLocation({
latitude: Number(this.detail.service.latitude),
longitude: Number(this.detail.service.longitude),
name: this.detail.name
})
})
},
toService(id) {
this.$u.throttle(() => {
uni.navigateTo({
url: `/packages/packageCarecenter/pages/careCenter/serviceDetail?id=${id}`
})
})
},
featuredLabelSplit(res) {
if (res) {
return res.split(",")
}
return []
},
getProductDetail(id) {
weixin.request({
newUrl: true,
api: '/api/member/get-confinement-product-item',
data: {
id
},
utilSuccess: (res) => {
this.detail = res
this.loading = false
console.log(res);
}
})
}
},
computed: {
},
onLoad(option) {
this.getProductDetail(option.id)
}
}
</script>
<style scoped lang="scss">
.service-show {
width: 100%;
height: 360rpx;
position: relative;
&>video {
width: 100%;
height: 100%;
}
&-swiper {
width: 100%;
height: 100%;
}
&-btn {
display: flex;
z-index: 3;
position: absolute;
bottom: 30rpx;
right: 33rpx;
&-img {
color: #fff;
height: 47rpx;
background: #252526;
border-radius: 16rpx;
opacity: 0.3;
display: flex;
align-items: center;
margin-right: 14rpx;
&>image {
width: 24rpx;
height: 21rpx;
padding-left: 20rpx;
padding-right: 10rpx;
}
&__num {
font-size: 24rpx;
color: #FFFFF0;
font-weight: 400;
padding-right: 20rpx;
}
}
&-video {
color: #fff;
height: 47rpx;
background: #252526;
border-radius: 16rpx;
opacity: 0.3;
display: flex;
align-items: center;
&>image {
width: 24rpx;
height: 21rpx;
padding-left: 20rpx;
padding-right: 10rpx;
}
&__num {
font-size: 24rpx;
color: #FFFFF0;
font-weight: 400;
padding-right: 20rpx;
}
}
}
}
.product-picture {
height: 417rpx;
width: 100%;
position: relative;
&-swiper {
width: 100%;
height: 100%;
}
&-num {
color: #fff;
background: #252526;
border-radius: 16rpx;
opacity: 0.3;
padding: 7rpx 20rpx;
position: absolute;
bottom: 20rpx;
right: 27rpx;
}
}
.product-price {
font-weight: 400;
color: #FF578A;
font-size: 24rpx;
background-color: #FFEFF4;
padding: 55rpx 21rpx;
}
.product-info {
background: #fff;
padding-bottom: 41rpx;
&-name {
font-weight: 400;
color: #333333;
font-size: 34rpx;
padding: 46rpx 34rpx 0 34rpx;
}
&-label {
display: flex;
flex-wrap: wrap;
margin-top: 21rpx;
padding: 0 32rpx;
&-item {
background: rgba(255, 87, 138, 0.1);
border-radius: 12rpx;
font-weight: 400;
color: #FF578A;
font-size: 24rpx;
padding: 10rpx 15rpx;
margin-right: 15rpx;
}
}
&-shop {
background: linear-gradient(180deg, #555455 0%, #1F1D1D 100%);
border-radius: 40rpx;
margin: 35rpx 30rpx 0 30rpx;
padding: 0 30rpx 0 36rpx;
&-top {
display: flex;
align-items: center;
padding-top: 23rpx;
&-img {}
&-name {
color: #fff;
flex: 1;
margin-left: 20rpx;
&>view:nth-child(1) {
font-weight: 400;
color: #FFFFFF;
font-size: 30rpx;
}
&>view:nth-child(2) {
display: inline-block;
text-align: center;
border-radius: 12rpx;
font-size: 24rpx;
font-weight: 400;
color: #FFFFFF;
background-color: #FF578A;
padding: 4rpx 11rpx;
margin-top: 10rpx;
}
}
&-more {
font-size: 24rpx;
color: #A0A0A0;
font-weight: 400;
align-self: flex-start;
padding-right: 26rpx;
padding-top: 6rpx;
}
}
&-bottom {
display: flex;
align-items: flex-start;
padding-right: 26rpx;
padding-left: 8rpx;
padding-bottom: 42rpx;
margin-top: 37rpx;
&-text {
flex: 1;
font-weight: 400;
color: #FFFFFF;
font-size: 24rpx;
padding: 0 23rpx 0 10rpx;
}
}
}
}
.combo {
background-color: #fff;
margin-top: 34rpx;
padding: 0 28rpx;
&-title {
font-size: 34rpx;
font-weight: 400;
color: #333333;
padding-top: 51rpx;
padding-left: 6rpx;
padding-bottom: 55rpx;
}
&-content {
display: flex;
flex-wrap: wrap;
&>view:nth-last-child(1) {
margin-right: 0;
}
&-item {
text-align: center;
border: 1px solid #191B1A;
border-radius: 24rpx;
flex: 0;
height: 135rpx;
margin-right: 14rpx;
margin-bottom: 12rpx;
&-name {
font-size: 30rpx;
font-weight: 400;
color: #333333;
white-space: nowrap;
word-wrap: keep-all;
padding: 27rpx 24rpx 18rpx 24rpx;
}
&-content {
background-color: #191B1A;
color: #fff;
border-radius: 0 0 24rpx 24rpx;
white-space: nowrap;
word-wrap: keep-all;
padding: 8rpx 24rpx;
}
}
}
}
.service-baseinfo {
width: 100%;
background: linear-gradient(90deg, #555455 0%, #1F1D1D 100%);
padding-bottom: 38rpx;
&-center {
margin-top: 28rpx;
&-store {
position: relative;
margin-top: 30rpx;
padding: 0 33rpx;
&-tag {
display: flex;
align-items: center;
background: linear-gradient(90deg, #FFFFFF 0%, #FFF0F0 100%);
border-bottom-left-radius: 20rpx;
border-bottom-right-radius: 20rpx;
padding: 9rpx 18rpx;
position: absolute;
top: 0;
left: 76rpx;
&>image {
width: 25rpx;
height: 25rpx;
}
&-text {
font-size: 24rpx;
font-weight: 400;
color: #FF578A;
padding-left: 11rpx;
}
}
}
}
}
.facility {
background-color: #fff;
&-title {
padding: 73rpx 0 44rpx 34rpx;
font-weight: 400;
color: #333333;
font-size: 34rpx;
}
&-content {
display: flex;
flex-wrap: wrap;
padding: 44rpx 64rpx 66rpx 64rpx;
&-item {
flex-basis: 25%;
font-size: 24rpx;
font-weight: 400;
color: #333333;
text-align: center;
margin-bottom: 24rpx;
&-icon {
width: 55rpx;
height: 55rpx;
font-size: 55rpx;
margin: auto;
}
&-name {
padding-top: 13rpx;
}
}
}
}
::v-deep .u-image__image {
display: block !important;
}
</style>

@ -12,38 +12,12 @@
</view>
</view>
<view class="menuBox">
<view class="menuCol" @click="toAction" data-id="-1">
<image src="../../static/icon_home_youxuan@2x.png"></image>
<view>为您优选</view>
</view>
<view class="menuCol" @click="gotomember">
<image src="../../static/icon_home_women@2x.png"></image>
<view>福利包</view>
</view>
<view class="menuCol" @click="toAction" data-id="10">
<image src="../../static/icon_home_huodong@2x.png"></image>
<view>产后康复</view>
</view>
<view class="menuCol" @click="toAction" data-id="28">
<image src="../../static/icon_home_fuwu@2x.png"></image>
<view>摄影</view>
</view>
<view class="menuCol" @click="toAction" data-id="13">
<image src="../../static/icon_home_youhui@2x.png"></image>
<view>宝宝护理</view>
</view>
<view class="menuCol" @click="toAction" data-id="23">
<image src="../../static/icon_home_shanghu@2x.png"></image>
<view>胎教</view>
</view>
<view class="menuCol" @click="toAction" data-id="25">
<image src="../../static/icon_home_shangcheng@2x.png"></image>
<view>其他</view>
</view>
<view class="menuCol" @tap="goCarecenter">
<image src="../../static/icon_home_yuezizhongxin.png"></image>
<view>月子中心</view>
</view>
<block v-for="item in indexNav" :key="item.id">
<view class="menuCol" @click="toAction(item)" data-id="-1">
<image :src="item.icon"></image>
<view>{{item.name}}</view>
</view>
</block>
</view>
<!--为您精选活动-->
<view class="introBox">
@ -116,11 +90,12 @@
keyword: "",
currentPage: 1,
dataList: [],
dataActiveList: []
dataActiveList: [],
indexNav: []
}
},
onLoad() {
this.getNav();
},
onShow() {
this.getAdS();
@ -142,12 +117,26 @@
this.loadPage((this.currentPage + 1), '', 6, 1)
},
methods: {
toAction: function(e) {
var id = e.currentTarget.dataset.id;
if (!weixin.isNull(id) || id == "-1") {
id = (id == "-1" ? "" : id);
async getNav(code) {
await weixin.request({
newUrl: true,
api: '/api/member/applet-menu-first/index',
data: {
page: 1,
page_size: 8,
sort_name: "sort_number",
sort_type: "asc"
},
utilSuccess: (res) => {
this.indexNav = res.data;
}
})
},
toAction: function(item) {
console.log(item)
if (item.link) {
uni.redirectTo({
url: "../../packages/packageBuy/pages/shopList/shopList?product_type_id=" + id
url: item.link
})
} else {
uni.showToast({
@ -155,7 +144,6 @@
title: "建设中"
})
}
console.log(e)
},
gotomember() {
uni.navigateTo({

Loading…
Cancel
Save