|
@@ -5,7 +5,7 @@
|
|
<uni-swiper-dot :info="info" :current="current1" :mode="mode" :dots-styles="dotsStyles">
|
|
<uni-swiper-dot :info="info" :current="current1" :mode="mode" :dots-styles="dotsStyles">
|
|
<swiper class="swiper-box" @change="change1" circular>
|
|
<swiper class="swiper-box" @change="change1" circular>
|
|
<swiper-item v-for="(item ,index) in info" :key="index">
|
|
<swiper-item v-for="(item ,index) in info" :key="index">
|
|
- <view class="swiper-item" @click="goGoodsDetail(item.pic_url)">
|
|
|
|
|
|
+ <view class="swiper-item" >
|
|
<image style="width: 100%;height:576rpx;" :src="item.img" mode="aspectFill"></image>
|
|
<image style="width: 100%;height:576rpx;" :src="item.img" mode="aspectFill"></image>
|
|
</view>
|
|
</view>
|
|
</swiper-item>
|
|
</swiper-item>
|
|
@@ -16,15 +16,15 @@
|
|
<view style="background-color: #f9f9f9;">
|
|
<view style="background-color: #f9f9f9;">
|
|
<!-- 价格 -->
|
|
<!-- 价格 -->
|
|
<view class="price">
|
|
<view class="price">
|
|
- <view class="price-top">
|
|
|
|
|
|
+ <view class="price-top" v-if="false">
|
|
<text>¥</text>
|
|
<text>¥</text>
|
|
- <text>269</text>
|
|
|
|
|
|
+ <text>{{productDetail.price}}</text>
|
|
</view>
|
|
</view>
|
|
- <view class="price-top" v-if="false">
|
|
|
|
- <text>300</text>
|
|
|
|
|
|
+ <view class="price-top" v-if="true">
|
|
|
|
+ <text>{{productDetail.integral}}</text>
|
|
<text>积分</text>
|
|
<text>积分</text>
|
|
- </view>
|
|
|
|
- <text class="price-text">端午佳节五香肉粽子,仅限前五名供。</text>
|
|
|
|
|
|
+ </view>
|
|
|
|
+ <text class="price-text">{{productDetail.name}}</text>
|
|
<view class="price-banner" :style="{backgroundImage:'url('+backImageUrl+')'}">
|
|
<view class="price-banner" :style="{backgroundImage:'url('+backImageUrl+')'}">
|
|
<text>加入IHG优悦会会员享受更多福利</text>
|
|
<text>加入IHG优悦会会员享受更多福利</text>
|
|
<image style="width: 12rpx;height: 20rpx;" src="/static/icon/right02.png" mode=""></image>
|
|
<image style="width: 12rpx;height: 20rpx;" src="/static/icon/right02.png" mode=""></image>
|
|
@@ -47,18 +47,18 @@
|
|
<!--酒店信息 -->
|
|
<!--酒店信息 -->
|
|
<view class="about">
|
|
<view class="about">
|
|
<text class="about-title">可购买酒店信息</text>
|
|
<text class="about-title">可购买酒店信息</text>
|
|
- <text class="about-name">洲际环球大酒店</text>
|
|
|
|
|
|
+ <text class="about-name">{{hotelDetail.name}}</text>
|
|
<view class="about-address">
|
|
<view class="about-address">
|
|
<text style="margin-right:20rpx ;">地址:</text>
|
|
<text style="margin-right:20rpx ;">地址:</text>
|
|
- <text>成都市武侯区天府大道北段1928号</text>
|
|
|
|
|
|
+ <text>{{hotelDetail.address}}</text>
|
|
</view>
|
|
</view>
|
|
<view class="about-phone">
|
|
<view class="about-phone">
|
|
<text style="margin-right:20rpx ;">电话:</text>
|
|
<text style="margin-right:20rpx ;">电话:</text>
|
|
- <text>201823102</text>
|
|
|
|
|
|
+ <text>{{hotelDetail.phone}}</text>
|
|
</view>
|
|
</view>
|
|
<view class="about-all">
|
|
<view class="about-all">
|
|
- <text @click="goGoodsHotel" style="margin-right: 16rpx;">全部酒店</text>
|
|
|
|
- <image @click="goGoodsHotel" style="width: 12rpx;height: 20rpx;" src="/static/icon/right04.png"
|
|
|
|
|
|
+ <text @click="goGoodsHotel(product_id)" style="margin-right: 16rpx;">全部酒店</text>
|
|
|
|
+ <image @click="goGoodsHotel(product_id)" style="width: 12rpx;height: 20rpx;" src="/static/icon/right04.png"
|
|
mode=""></image>
|
|
mode=""></image>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
@@ -70,7 +70,7 @@
|
|
<text>产品简介</text>
|
|
<text>产品简介</text>
|
|
</view>
|
|
</view>
|
|
<view class="produce-text">
|
|
<view class="produce-text">
|
|
- <text>洲际环球大酒店洲际环球大酒店洲际环球大酒店洲际环球大酒店洲际环球大酒店洲际环球大酒店洲际环球大酒店</text>
|
|
|
|
|
|
+ <text>{{productDetail.details}}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -80,10 +80,10 @@
|
|
<image style="width: 40rpx;height: 42rpx;" src="/static/icon/home01.png" mode=""></image>
|
|
<image style="width: 40rpx;height: 42rpx;" src="/static/icon/home01.png" mode=""></image>
|
|
<text>首页</text>
|
|
<text>首页</text>
|
|
</view>
|
|
</view>
|
|
- <view class="buy-btn-right" @click="$refs.codePurchase.open()">
|
|
|
|
|
|
+ <view class="buy-btn-right" @click="$refs.codePurchase.open()" v-if="false">
|
|
<text>立即购买</text>
|
|
<text>立即购买</text>
|
|
</view>
|
|
</view>
|
|
- <view v-if="false" class="buy-btn-right" @click="$refs.codePurchase.open()">
|
|
|
|
|
|
+ <view v-if="true" class="buy-btn-right" @click="goIntegralOrder">
|
|
<text>立即兑换</text>
|
|
<text>立即兑换</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -95,13 +95,17 @@
|
|
<view class="pop-price">
|
|
<view class="pop-price">
|
|
<view class="pop-price-left">
|
|
<view class="pop-price-left">
|
|
<image style="width: 180rpx;height: 136rpx; border-radius:12rpx ;"
|
|
<image style="width: 180rpx;height: 136rpx; border-radius:12rpx ;"
|
|
- src="http://t9.9026.com/imgs/special01.png" mode=""></image>
|
|
|
|
- <view class="pop-price-left-money">
|
|
|
|
|
|
+ src="http://t9.9026.com/imgs/special01.png" mode="" ></image>
|
|
|
|
+ <view class="pop-price-left-money" v-if="false">
|
|
<text>¥</text>
|
|
<text>¥</text>
|
|
- <text>269</text>
|
|
|
|
|
|
+ <text>{{productDetail.price}}</text>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="pop-price-left-money">
|
|
|
|
+ <text>{{productDetail.integral}}</text>
|
|
|
|
+ <text>积分</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <image style="width: 52rpx;height: 52rpx;" src="/static/icon/close01.png" mode=""></image>
|
|
|
|
|
|
+ <image style="width: 52rpx;height: 52rpx;" src="/static/icon/close01.png" mode="" @click="Recipientclose"></image>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
<view class="pop-flavor">
|
|
<view class="pop-flavor">
|
|
@@ -110,7 +114,7 @@
|
|
<view class="flavorTitle-item" :class="{'flavorTitle-item-active':isActive === index}" v-for="(item,index) in flavorList" :key="index"
|
|
<view class="flavorTitle-item" :class="{'flavorTitle-item-active':isActive === index}" v-for="(item,index) in flavorList" :key="index"
|
|
@click="checked(index)">
|
|
@click="checked(index)">
|
|
<view :class="{'active-flavor':isActive === index}">
|
|
<view :class="{'active-flavor':isActive === index}">
|
|
- {{item.title}}
|
|
|
|
|
|
+ {{item.attr_name}}
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -121,7 +125,7 @@
|
|
<view class="flavorTitle-item" :class="{'flavorTitle-item-active':isActive === index}" v-for="(item,index) in weightList" :key="index"
|
|
<view class="flavorTitle-item" :class="{'flavorTitle-item-active':isActive === index}" v-for="(item,index) in weightList" :key="index"
|
|
@click="checked(index)">
|
|
@click="checked(index)">
|
|
<view :class="{'active-flavor':isActive === index}">
|
|
<view :class="{'active-flavor':isActive === index}">
|
|
- {{item.title}}
|
|
|
|
|
|
+ {{item.attr_name}}
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -138,10 +142,10 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view class="purchase" v-if="true">
|
|
|
|
|
|
+ <view class="purchase" v-if="false">
|
|
<view class="purchase-btn">立即购买</view>
|
|
<view class="purchase-btn">立即购买</view>
|
|
</view>
|
|
</view>
|
|
- <view class="purchase" v-if="false">
|
|
|
|
|
|
+ <view class="purchase" v-if="true" @click="goIntegralOrder">
|
|
<view class="purchase-btn">立即兑换</view>
|
|
<view class="purchase-btn">立即兑换</view>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
@@ -169,6 +173,12 @@
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ // 产品详情
|
|
|
|
+ productDetail:'',
|
|
|
|
+ // 酒店详情
|
|
|
|
+ hotelDetail:'',
|
|
|
|
+ // 产品id
|
|
|
|
+ product_id:'',
|
|
packList: [{
|
|
packList: [{
|
|
title: '礼盒'
|
|
title: '礼盒'
|
|
},
|
|
},
|
|
@@ -192,7 +202,7 @@
|
|
}],
|
|
}],
|
|
//激活指定table菜单
|
|
//激活指定table菜单
|
|
isActive: 0,
|
|
isActive: 0,
|
|
-
|
|
|
|
|
|
+
|
|
backImageUrl: require('../../../static/icon/add01.png'),
|
|
backImageUrl: require('../../../static/icon/add01.png'),
|
|
|
|
|
|
//轮播图
|
|
//轮播图
|
|
@@ -213,11 +223,41 @@
|
|
mode: 'dot',
|
|
mode: 'dot',
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ onLoad(op) {
|
|
|
|
+ this.product_id=op.id
|
|
|
|
+ this.getProductDetail(op.id)
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
- //酒店列表
|
|
|
|
- goGoodsHotel() {
|
|
|
|
|
|
+ // 获取商品详情
|
|
|
|
+ getProductDetail(id){
|
|
|
|
+ this.$api.product.getProductDetail({
|
|
|
|
+ product_id:id
|
|
|
|
+ }).then(res=>{
|
|
|
|
+ console.log(res,"产品详情")
|
|
|
|
+ console.log(JSON.parse(res.data.attr_group),"产品规格")
|
|
|
|
+ if(res.code==0){
|
|
|
|
+ this.productDetail=res.data
|
|
|
|
+ // 口味
|
|
|
|
+ this.flavorList=JSON.parse(res.data.attr_group)[0].attr_list
|
|
|
|
+ // 重量
|
|
|
|
+ this.weightList=JSON.parse(res.data.attr_group)[1].attr_list
|
|
|
|
+ this.getHotelDetail(res.data.hotel_id)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ // 获取酒店详情
|
|
|
|
+ getHotelDetail(id){
|
|
|
|
+ this.$api.hotel.getHotelDetail({
|
|
|
|
+ hotel_id:id
|
|
|
|
+ }).then(res=>{
|
|
|
|
+ console.log(res,"酒店详情")
|
|
|
|
+ this.hotelDetail=res.data
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ //跳转酒店列表
|
|
|
|
+ goGoodsHotel(id) {
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
- url: '/pages/goods/goods-hotel/index'
|
|
|
|
|
|
+ url: '/pages/goods/goods-hotel/index?product_id='+id
|
|
})
|
|
})
|
|
},
|
|
},
|
|
//首页
|
|
//首页
|
|
@@ -229,10 +269,12 @@
|
|
//二维码购买确认按钮
|
|
//二维码购买确认按钮
|
|
dialogConfirm() {
|
|
dialogConfirm() {
|
|
console.log('确认');
|
|
console.log('确认');
|
|
|
|
+ this.codePurchaseClose()
|
|
},
|
|
},
|
|
//二维码购买取消按钮
|
|
//二维码购买取消按钮
|
|
dialogClose() {
|
|
dialogClose() {
|
|
console.log('取消');
|
|
console.log('取消');
|
|
|
|
+ this.codePurchaseClose()
|
|
},
|
|
},
|
|
//菜单index切换
|
|
//菜单index切换
|
|
checked(index) {
|
|
checked(index) {
|
|
@@ -244,11 +286,19 @@
|
|
Recipientclose() {
|
|
Recipientclose() {
|
|
this.$refs.Recipient.close()
|
|
this.$refs.Recipient.close()
|
|
},
|
|
},
|
|
|
|
+ codePurchaseClose(){
|
|
|
|
+ this.$refs.codePurchase.close()
|
|
|
|
+ },
|
|
// 切换轮播图指示点
|
|
// 切换轮播图指示点
|
|
change1(e) {
|
|
change1(e) {
|
|
this.current1 = e.detail.current;
|
|
this.current1 = e.detail.current;
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+ // 跳转积分兑换
|
|
|
|
+ goIntegralOrder(){
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url:'/pages/my/integral/integralOrder'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|