123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483 |
- <template>
- <view class="setMealDetail">
- <image :src="baseImagePath + setMeal.imgUrl" alt="">
- <view class="header-card">
- <view class="header">
- {{setMeal.name}}
- </view>
- <view class="content">
- {{setMeal.title}}
- </view>
- <view class="bottom" v-if="setMeal.invalidDay">
- <view class="left">
- {{setMeal.invalidDay}}前有效
- </view>
- <view class="right" v-if="setMeal.status">
- 生效中
- </view>
- <view class="right" v-else>
- 已失效
- </view>
- </view>
- <view class="bottom" v-else>
- <view class="left">
- 购买后{{setMeal.invalidTime}}天内有效
- </view>
- <view class="right" v-if="setMeal.status">
- 生效中
- </view>
- <view class="right" v-else>
- 已失效
- </view>
- </view>
- </view>
- <!-- 套餐项目 -->
- <view class="servicesAvailable">
- <view class="header">
- <view class="title">
- 套餐项目
- </view>
- <view class="border"></view>
- </view>
- <view class="body" v-for="(item, index) in servicesAvailableList" :key="index">
- <view class="title">
- {{item.sstName}}
- </view>
- <view class="border">
- </view>
- <view class="length">
- ×{{item.buyNum}}
- </view>
- <view class="lengths">
- 余 <span>{{item.surplusSum}}</span>
- </view>
- </view>
- </view>
- <!-- 可用门店 -->
- <view class="shop">
- <view class="header">
- <view class="title">
- 可用门店
- </view>
- <view class="border"></view>
- </view>
- <view class="flexView">
- <view class="body" v-for="(item, index) in shopList" :key="index">
- <image :src="baseImagePath + item.logoUrl" alt="">
- <view class="subbody">
- <view class="title">
- {{item.name}}
- </view>
- <view class="content">
- <view class="location">
- {{item.address}}
- </view>
- <view class="right">
- <image :src="require('../../../static/address.png')" alt="" style="margin-right: 10rpx;">
- <view class="km">
- {{item.distance}}km
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <!-- 套餐详情 -->
- <view class="detail">
- <view class="header">
- <view class="title">
- 套餐详情
- </view>
- <view class="border"></view>
- </view>
- <view class="content" v-html="setMeal.introduce">
-
- </view>
- </view>
- <view style="height: 200rpx;">
- </view>
- <!-- 底部按钮 -->
- <view class="bottomBtn" v-if="type !== 'my'">
- <view class="leftView">
- <view class="chooseNum">
- <view style="font-size: 26rpx;">
- ¥
- </view>
- <view style="font-size: 56rpx;">
- {{setMeal.carPrice}}-{{setMeal.truckPrice}}
- </view>
- </view>
- </view>
- <view class="rightView" @click="routerTo()">
- 立即购买
- </view>
- </view>
- </view>
- </template>
- <script>
- import {
- userPackageDefail
- } from '../../../api/myApi.js'
- const app = getApp()
- export default {
- components: {},
- data() {
- return {
- longitude: app.globalData.longitude,
- latitude: app.globalData.latitude,
- baseImagePath:this.baseImagePath,
- packageId:null,
- setMeal: {},
- shopList: [],
- servicesAvailableList: [],
- type:''
- };
- },
- onLoad(options) {
- this.packageId = options.id
- this.type = options.type
- this.getInfo()
- },
- methods: {
- routerTo(item) {
- this.$yrouter.push({
- path: "/pages/maintenance/setMeal/buySetMeal/index?item=" + JSON.stringify(this.setMeal)
- });
- },
- getInfo(){
- let data = {
- longitude: this.longitude,
- latitude: this.latitude,
- id:this.packageId
- }
- userPackageDefail(data).then(res=>{
- this.setMeal = res.data.packagesVO
- console.log(this.setMeal);
- this.servicesAvailableList = res.data.userPackageSerVOS
- console.log(this.servicesAvailableList);
- this.shopList = res.data.shopVOList
- })
- }
- }
- }
- </script>
- <style lang="less">
- page {
- background: #EDEDED;
- }
- .bottomBtn {
- width: 690rpx;
- height: 110rpx;
- background: #FFFFFF;
- border: 1px solid #EEEEEE;
- box-shadow: 0px 8rpx 17rpx 0px rgba(168, 165, 165, 0.26);
- border-radius: 55rpx;
- margin-left: 30rpx;
- position: fixed;
- bottom: 67rpx;
- z-index: 9998;
- .leftView {
- float: left;
- height: 100%;
- display: flex;
- align-items: center;
- margin-left: 57rpx;
- .chooseNum {
- font-size: 30rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #FF3C00;
- line-height: 31rpx;
- display: flex;
- align-items: baseline;
- }
- }
- .rightView {
- float: right;
- width: 210rpx;
- height: 108rpx;
- background: linear-gradient(0deg, #005AFF 0%, #0078FF 100%);
- border-radius: 0 55rpx 55rpx 0;
- font-size: 34rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #FEFEFE;
- line-height: 108rpx;
- text-align: center;
- }
- }
- .detail {
- background: #FFFFFF;
- border-radius: 10px;
- margin-top: 20rpx;
- padding: 36rpx 30rpx;
- .header {
- padding-bottom: 36rpx;
- .title {
- font-size: 28rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #333333;
- line-height: 29rpx;
- }
- .border {
- width: 106rpx;
- height: 6rpx;
- background: linear-gradient(90deg, #005BFF 0%, #FFFFFF 100%);
- opacity: 0.6;
- }
- }
- .content {
- font-size: 26rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #666666;
- line-height: 36rpx;
- padding: 0 30rpx 0 0;
- overflow: hidden;
- display: flex;
- }
- }
- .shop {
- max-height: 514rpx;
- background: #FFFFFF;
- border-radius: 10rpx;
- margin-top: 20rpx;
- padding: 36rpx 30rpx 0;
- .header {
- padding-bottom: 36rpx;
- .title {
- font-size: 28rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #333333;
- line-height: 29rpx;
- }
- .border {
- width: 106rpx;
- height: 6rpx;
- background: linear-gradient(90deg, #005BFF 0%, #FFFFFF 100%);
- opacity: 0.6;
- }
- }
- .flexView {
- max-height: 420rpx;
- overflow-x: auto;
- flex-direction: column;
- display: flex;
- flex-wrap: wrap;
- .body {
- width: 655rpx;
- height: 101rpx;
- background: #FFFFFF;
- border-radius: 10rpx;
- display: flex;
- padding-bottom: 36rpx;
- image {
- width: 100rpx;
- height: 100rpx;
- }
- .subbody {
- width: 76%;
- padding: 11rpx 21rpx 11rpx 21rpx;
- .title {
- font-size: 32rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #333333;
- line-height: 31rpx;
- }
- .content {
- padding-top: 21rpx;
- .location {
- width: 350rpx;
- font-size: 24rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #999999;
- line-height: 31rpx;
- float: left;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .right {
- display: flex;
- align-items: center;
- image {
- width: 23rpx;
- height: 23rpx;
- }
- .km {
- font-size: 24rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #333333;
- line-height: 31rpx;
- }
- }
- }
- }
- }
- }
- }
- .servicesAvailable {
- background: #FFFFFF;
- border-radius: 10rpx;
- margin-top: 20rpx;
- padding: 36rpx 30rpx;
- .header {
- padding-bottom: 36rpx;
- .title {
- font-size: 28rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #333333;
- line-height: 29rpx;
- }
- .border {
- width: 106rpx;
- height: 6rpx;
- background: linear-gradient(90deg, #005BFF 0%, #FFFFFF 100%);
- opacity: 0.6;
- }
- }
- .body {
- display: flex;
- padding: 19rpx;
- justify-content: space-around;
- align-items: center;
- .title {
- font-size: 26rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #666666;
- line-height: 29rpx;
- }
- .border {
- width: 354rpx;
- height: 1rpx;
- border-top: 1px dashed #CCCCCC;
- }
- .length {
- font-size: 26rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #666666;
- line-height: 29rpx;
- }
- .lengths {
- font-size: 24rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #666666;
- line-height: 29rpx;
- span {
- color: #005BFF;
- }
- }
- }
- }
- .setMealDetail {
- image {
- width: 100%;
- height: 750rpx;
- }
- .header-card {
- background: #FFFFFF;
- border-radius: 0px 0px 16rpx 16rpx;
- padding: 40rpx 0 0 29rpx;
- .header {
- font-size: 32rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #333333;
- line-height: 31rpx;
- padding-right: 29rpx;
- }
- .content {
- font-size: 26rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #999999;
- line-height: 36rpx;
- padding-top: 25rpx;
- padding-right: 29rpx;
- }
- .bottom {
- display: flex;
- justify-content: space-between;
- padding-top: 37rpx;
- position: relative;
- .left {
- font-size: 26rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #005BFF;
- line-height: 55rpx;
- padding-bottom: 22rpx;
- }
- .right {
- width: 167rpx;
- height: 62rpx;
- background: linear-gradient(-35deg, #FF6000 0%, #FFA800 100%);
- border-radius: 10rpx 0rpx 10rpx 0rpx;
- font-size: 30rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #FFFFFF;
- line-height: 62rpx;
- text-align: center;
- position: absolute;
- right: 0;
- bottom: 0;
- }
- }
- }
- }
- </style>
|