Commit 961aa929 authored by 潘永坪's avatar 潘永坪

影集参数修改

parent 5d9cf187
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
取片地址: 取片地址:
</text> </text>
<text> <text>
重庆市渝中区新华路151号长江索道南站观景台旁 {{extendContent.projectAddress}}
</text> </text>
</view> </view>
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
咨询电话: 咨询电话:
</text> </text>
<text> <text>
023-68567748 {{extendContent.projectPhone}}
</text> </text>
</view> </view>
<view> <view>
...@@ -147,6 +147,7 @@ export default { ...@@ -147,6 +147,7 @@ export default {
orderInfo:'',//订单信息 orderInfo:'',//订单信息
imgList:[],//下载图片列表 imgList:[],//下载图片列表
downImgNumber:0,//下载图片的数量 downImgNumber:0,//下载图片的数量
extendContent:'',//额外信息
} }
}, },
onLoad(option) { onLoad(option) {
...@@ -181,6 +182,7 @@ export default { ...@@ -181,6 +182,7 @@ export default {
this.$request('order/userOrder/findOrderDetail', data).then(res => { this.$request('order/userOrder/findOrderDetail', data).then(res => {
if (res.code == '00') { if (res.code == '00') {
this.orderInfo = res.data this.orderInfo = res.data
this.extendContent=JSON.parse(this.orderInfo.extendContent)
let imgList=this.orderInfo.orderImgList||[] let imgList=this.orderInfo.orderImgList||[]
imgList.forEach(item=>{ imgList.forEach(item=>{
this.imgList.push(item.imgUrl) this.imgList.push(item.imgUrl)
......
...@@ -288,7 +288,7 @@ export default { ...@@ -288,7 +288,7 @@ export default {
//---跳转联合国际 //---跳转联合国际
goGuoji(){ goGuoji(){
uni.navigateTo({ uni.navigateTo({
url:'/pages/scenic/scenicProduct/scenicProduct?merchantId=z00160128940329482da6bd94d443a91' url:'/pages/scenic/scenicProduct/scenicProduct?merchantId=z00160128940329482da6bd94d443a91&channelType=1'
}) })
}, },
//---跳转两江游 //---跳转两江游
......
...@@ -171,7 +171,6 @@ export default { ...@@ -171,7 +171,6 @@ export default {
//获取公司Id,保存到本地,支付等逻辑需要入口companyId //获取公司Id,保存到本地,支付等逻辑需要入口companyId
this.$commonjs.getCompanyId(option) this.$commonjs.getCompanyId(option)
let token = uni.getStorageSync('token')||'' let token = uni.getStorageSync('token')||''
uni.setStorageSync('companyId',companyId)
if(token){ if(token){
uni.getLocation({ uni.getLocation({
type: 'wgs84', type: 'wgs84',
......
<template> <template>
<view class="wrap"> <view class="wrap">
<view class="banner"> <view class="banner">
<u-swiper :list="imgList" name='url' mode="number" height="420" indicator-pos="topRight"></u-swiper> <u-swiper :list="imgList" name="url" mode="number" height="420" indicator-pos="topRight"></u-swiper>
</view> </view>
<view class="middle"> <view class="middle">
<view class="tabbar"> <view class="tabbar">
<text v-for="(item,index) in tabbar" :key='index' @click="tabbarChange(index)" :class="{'on':active==index}"> <text v-for="(item, index) in tabbar" :key="index" @click="tabbarChange(index)" :class="{ on: active == index }">
{{item}} {{ item }}
</text> </text>
</view> </view>
<swiper :current="active" @animationfinish="animationfinish" class="swiper-box"> <swiper :current="active" @animationfinish="animationfinish" class="swiper-box">
<swiper-item class="swiper-item"> <swiper-item class="swiper-item">
<scroll-view scroll-y style="height:100%;width: 100%;"> <scroll-view scroll-y style="height: 100%; width: 100%">
<checkbox-group @change="checkboxChange"> <checkbox-group @change="checkboxChange">
<view class="merchant" v-for="(item,index) in scenicList" :key='index'> <view class="merchant" v-for="(item, index) in scenicList" :key="index">
<view class="merchant-title"> <view class="merchant-title">
<view class="title-left"> <view class="title-left">
<text >{{item.name}}</text> <text>{{ item.name }}</text>
<template v-if="item.couponVoList&&item.couponVoList.length>0"> <template v-if="item.couponVoList && item.couponVoList.length > 0">
<image src="../../../static/img/scenic/coupon.png"></image> <image src="@/static/img/scenic/coupon.png"></image>
<text class="title-coupon"> <text class="title-coupon"> 劵惠 </text>
劵惠 </template>
</text> </view>
</template>
<view v-if="showDistance" class="title-right"> 距您{{ item.distance ? parseFloat((item.distance / 1000).toFixed(2)) : 0 }}km </view>
</view> </view>
<view v-if="showDistance" class="title-right"> <label v-for="(items, a) in item.productListCopy" :key="a" :class="{ off: items.status == 2 }">
距您{{item.distance?parseFloat((item.distance/1000).toFixed(2)):0}}km <view class="product" :class="{ on: items.ifChangeBg }">
</view>
</view>
<label v-for="(items,a) in item.productListCopy" :key='a' :class="{'off':items.status==2}">
<view class="product" :class="{'on':items.ifChangeBg}">
<view class="product-left"> <view class="product-left">
<checkbox style="transform:scale(0.8)" class="blue" :disabled="items.status==2" :value="JSON.stringify(items)" :checked="items.ifChecked" /> <checkbox
style="transform: scale(0.8)"
class="blue"
:disabled="items.status == 2"
:value="JSON.stringify(items)"
:checked="items.ifChecked"
/>
</view> </view>
<view class="product-right"> <view class="product-right">
<view class="product-name"> <view class="product-name">
<text>{{items.name}}</text> <text>{{ items.name }}</text>
<text class="product-status" v-if='items.status==2'>{{items.statusName}}</text> <text class="product-status" v-if="items.status == 2">{{ items.statusName }}</text>
</view> </view>
<view class="product-price"> <view class="product-price">
<view style="font-size: 24rpx;"> <view style="font-size: 24rpx">
<text class="product-rule" v-if="items.productRefundRuleVo"> <text class="product-rule" v-if="items.productRefundRuleVo">
<text v-if="items.productRefundRuleVo.refundType==0">不可退</text> <text v-if="items.productRefundRuleVo.refundType == 0">不可退</text>
<text v-if="items.productRefundRuleVo.refundType==1">规定时间退</text> <text v-if="items.productRefundRuleVo.refundType == 1">规定时间退</text>
<text v-if="items.productRefundRuleVo.refundType==2">随时可退</text> <text v-if="items.productRefundRuleVo.refundType == 2">随时可退</text>
</text> </text>
<text class="product-rule"> <text class="product-rule"> 无需取票 </text>
无需取票 <text @click="showBuyKnow(items)">购买须知</text>
</text>
<text @click="showBuyKnow(items)">购买须知</text>
<u-icon name="arrow-right"></u-icon> <u-icon name="arrow-right"></u-icon>
</view> </view>
<view> <view>
<text class="product-orange"> <text class="product-orange"> ¥{{ items.originalPrice }} </text>
¥{{items.originalPrice}} <text class="product-sell"> <text style="font-size: 28rpx">¥</text>{{ items.sellingPrice }} </text>
</text>
<text class="product-sell">
<text style="font-size: 28rpx;">¥</text>{{items.sellingPrice}}
</text>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</label> </label>
<view class="product-more" v-if="index>0&&item.productList.length>2" > <view class="product-more" v-if="index > 0 && item.productList.length > 2">
<view v-if="item.productListCopy.length!=item.productList.length" @click="showMoreProduct(item)"> <view v-if="item.productListCopy.length != item.productList.length" @click="showMoreProduct(item)">
更多 更多
<u-icon name='arrow-down'></u-icon> <u-icon name="arrow-down"></u-icon>
</view> </view>
<view v-else @click="retractProduct(item)"> <view v-else @click="retractProduct(item)">
收起 收起
<u-icon name='arrow-up'></u-icon> <u-icon name="arrow-up"></u-icon>
</view>
</view> </view>
</view> </view>
</view> </checkbox-group>
</checkbox-group> <u-empty text="空空如也..." mode="list" v-if="scenicList.length == 0"></u-empty>
<u-empty text="空空如也..." mode="list" v-if="scenicList.length==0"></u-empty>
</scroll-view> </scroll-view>
</swiper-item> </swiper-item>
<swiper-item class="swiper-item"> <swiper-item class="swiper-item">
<u-empty text="空空如也2..." mode="list"></u-empty> <u-empty text="空空如也2..." mode="list"></u-empty>
</swiper-item> </swiper-item>
<swiper-item class="swiper-item"> <swiper-item class="swiper-item">
<u-empty text="空空如也3..." mode="list"></u-empty> <u-empty text="空空如也3..." mode="list"></u-empty>
</swiper-item> </swiper-item>
...@@ -101,22 +96,20 @@ ...@@ -101,22 +96,20 @@
</view> </view>
<view class="bottom"> <view class="bottom">
<view class="bottom-left" @click="showCustomer()"> <view class="bottom-left" @click="showCustomer()">
<u-icon name='chat' size='36' style="margin-right: 8rpx;position: relative;top: 2rpx;"></u-icon> <u-icon name="chat" size="36" style="margin-right: 8rpx; position: relative; top: 2rpx"></u-icon>
客服 客服
</view> </view>
<view class="bottom-middle"> <view class="bottom-middle">
<view class="bottom-more" v-show="chooseProduct.length>0"> <view class="bottom-more" v-show="chooseProduct.length > 0">
组合购更优惠 组合购更优惠
<text class="bottom-three"></text> <text class="bottom-three"></text>
</view> </view>
<view class="bottom-detail" @click="showDetail()" :style="{'top':chooseProduct.length>0?'-28rpx':'0'}"> <view class="bottom-detail" @click="showDetail()" :style="{ top: chooseProduct.length > 0 ? '-28rpx' : '0' }">
<text> <text> 明细 </text>
明细 <u-icon name="arrow-up" size="32" style="margin: 0 8rpx"></u-icon>
</text>
<u-icon name='arrow-up' size='32' style="margin: 0 8rpx;"></u-icon>
<text class="bottom-number"> <text class="bottom-number">
{{chooseProduct.length}} {{ chooseProduct.length }}
</text> </text>
</view> </view>
</view> </view>
...@@ -125,315 +118,314 @@ ...@@ -125,315 +118,314 @@
</view> </view>
</view> </view>
<!-- 客服组件 --> <!-- 客服组件 -->
<customer :scenicList='scenicList' ref='customer'></customer> <customer :scenicList="scenicList" ref="customer"></customer>
<!-- 购买须知 --> <!-- 购买须知 -->
<buyKnow :buyKnowData='buyKnowData' ref='buyKnow'></buyKnow> <buyKnow :buyKnowData="buyKnowData" ref="buyKnow"></buyKnow>
<!-- 详情明细 --> <!-- 详情明细 -->
<detail :chooseProduct='chooseProduct' ref='detail'></detail> <detail :chooseProduct="chooseProduct" ref="detail"></detail>
<!-- 模态框 --> <!-- 模态框 -->
<u-modal <u-modal v-model="showModal" @confirm="chooseConfirm" @cancel="chooseCancel" title="提示" content="该产品不支持多选" show-cancel-button="true">
v-model="showModal"
@confirm="chooseConfirm"
@cancel='chooseCancel'
title='提示'
content='该产品不支持多选'
show-cancel-button=true >
</u-modal> </u-modal>
</view> </view>
</template> </template>
<script> <script>
import customer from '@/components/customer.vue'//客服 import customer from '@/components/customer.vue' //客服
import buyKnow from '@/components/buyKnow.vue'//购买须知 import buyKnow from '@/components/buyKnow.vue' //购买须知
import detail from './components/detail.vue'//购买须知 import detail from './components/detail.vue' //购买须知
export default { export default {
components:{ components: {
customer, customer,
buyKnow, buyKnow,
detail detail
}, },
data() { data() {
return { return {
merchantId:'',//商户Id merchantId: '', //商户Id
// tabbar:['热门景点','一日游','摄影/旅拍','文创DIY'],//tabbar标题列表 // tabbar:['热门景点','一日游','摄影/旅拍','文创DIY'],//tabbar标题列表
tabbar:['热门景点','一日游','摄影/旅拍'],//tabbar标题列表 tabbar: ['热门景点', '一日游', '摄影/旅拍'], //tabbar标题列表
active:0,//导航栏下标 active: 0, //导航栏下标
imgList:[],//图片列表 imgList: [], //图片列表
scenicList:[],//景区数据 scenicList: [], //景区数据
showDistance:false,//定位成功显示距离 showDistance: false, //定位成功显示距离
buyKnowData:'',//购买须知数据 buyKnowData: '', //购买须知数据
chooseProduct:[],//选中的产品 chooseProduct: [], //选中的产品
showModal:false,//是否显示模态框 showModal: false, //是否显示模态框
chooseMerchantProduct:'',//不支持多产品购买时,选中的景区产品 chooseMerchantProduct: '', //不支持多产品购买时,选中的景区产品
groupId:'',//组合Id groupId: '', //组合Id
groupChannelId:'',//组合渠道Id groupChannelId: '', //组合渠道Id
channelType: 0 //渠道类型
} }
}, },
watch: { watch: {
//选中产品的数量变化 //选中产品的数量变化
chooseProduct: { chooseProduct: {
handler(newValue, oldValue){ handler(newValue, oldValue) {
//当选中产品时 //当选中产品时
if(newValue.length>oldValue.length){ if (newValue.length > oldValue.length) {
//找到当前选中的产品 //找到当前选中的产品
let product=newValue[newValue.length-1] let product = newValue[newValue.length - 1]
//商家一级 //商家一级
let merchant='' let merchant = ''
//通过产品一级找到商家一级 //通过产品一级找到商家一级
this.scenicList.forEach(item=>{ this.scenicList.forEach(item => {
if(item.id==product.merchantId){ if (item.id == product.merchantId) {
merchant=item merchant = item
} }
}) })
//当选中产品的景区有2个以上选中产品时 //当选中产品的景区有2个以上选中产品时
let number=0 let number = 0
this.chooseProduct.forEach(item=>{ this.chooseProduct.forEach(item => {
if(merchant.id==item.merchantId){ if (merchant.id == item.merchantId) {
number+=1 number += 1
} }
}) })
if(product.isMoreBuy!==0){ if (product.isMoreBuy !== 0) {
if(number>1){ if (number > 1) {
//显示确认弹窗 //显示确认弹窗
this.showModal=true this.showModal = true
//当前选中的景区产品,用于确定以及取消方法取值 //当前选中的景区产品,用于确定以及取消方法取值
this.chooseMerchantProduct=product this.chooseMerchantProduct = product
} }
}else{ } else {
//支持多产品购买时,删除该景区其他产品不支持多产品购买的产品 //支持多产品购买时,删除该景区其他产品不支持多产品购买的产品
this.chooseProduct.forEach((item,index)=>{ this.chooseProduct.forEach((item, index) => {
if(merchant.id==item.merchantId&&item.isMoreBuy!==0){ if (merchant.id == item.merchantId && item.isMoreBuy !== 0) {
//取消选中状态和选中背景颜色 //取消选中状态和选中背景颜色
this.scenicList.forEach(item2=>{ this.scenicList.forEach(item2 => {
item2.productList.forEach(item3=>{ item2.productList.forEach(item3 => {
if(item.id==item3.id){ if (item.id == item3.id) {
item3.ifChecked=false item3.ifChecked = false
item3.ifChangeBg=false item3.ifChangeBg = false
} }
}) })
}) })
delete this.chooseProduct[index] delete this.chooseProduct[index]
} }
}) })
this.chooseProduct=this.chooseProduct.filter(function (val) { this.chooseProduct = this.chooseProduct.filter(function (val) {
return val return val
}) })
} }
} }
}, },
deep:true, deep: true,
immediate: false immediate: false
}, }
}, },
onLoad(option){ onLoad(option) {
//获取公司Id,保存到本地,支付等逻辑需要入口companyId //获取公司Id,保存到本地,支付等逻辑需要入口companyId
this.$commonjs.getCompanyId(option) this.$commonjs.getCompanyId(option)
this.merchantId=option.merchantId||'' this.channelType = option.channelType || 0
this.merchantId = option.merchantId || ''
let token = uni.getStorageSync('token') let token = uni.getStorageSync('token')
if(token){ if (token) {
uni.getLocation({ uni.getLocation({
type: 'wgs84', type: 'wgs84',
success:res=> { success: res => {
let latitude = res.latitude//纬度 let latitude = res.latitude //纬度
let longitude = res.longitude//经度 let longitude = res.longitude //经度
this.showDistance=true this.showDistance = true
this.initList(latitude,longitude) this.initList(latitude, longitude)
}, },
fail:res=>{ fail: res => {
let latitude='' let latitude = ''
let longitude='' let longitude = ''
this.initList(latitude,longitude) this.initList(latitude, longitude)
} }
}) })
} }
}, },
methods:{ methods: {
//---导航栏切换 //---导航栏切换
tabbarChange(index){ tabbarChange(index) {
this.active=index this.active = index
}, },
//---swiper滑动结束,分别设置tabs和swiper的状态 //---swiper滑动结束,分别设置tabs和swiper的状态
animationfinish(e) { animationfinish(e) {
let current = e.detail.current let current = e.detail.current
this.active = current this.active = current
}, },
//---展示客服组件 //---展示客服组件
showCustomer(){ showCustomer() {
this.$refs.customer.showPop=true this.$refs.customer.showPop = true
}, },
//---展示购买须知 //---展示购买须知
showBuyKnow(data){ showBuyKnow(data) {
this.buyKnowData=data this.buyKnowData = data
this.$refs.buyKnow.showPop=true this.$refs.buyKnow.showPop = true
}, },
//---展示明细弹窗 //---展示明细弹窗
showDetail(){ showDetail() {
this.$refs.detail.showPop=true this.$refs.detail.showPop = true
}, },
//---展示更多产品 //---展示更多产品
showMoreProduct(item){ showMoreProduct(item) {
item.productListCopy=item.productList item.productListCopy = item.productList
this.$forceUpdate() this.$forceUpdate()
}, },
//---收起产品 //---收起产品
retractProduct(item){ retractProduct(item) {
item.productListCopy=item.productList.slice(0,2) item.productListCopy = item.productList.slice(0, 2)
this.$forceUpdate() this.$forceUpdate()
}, },
//---多选框变化 //---多选框变化
checkboxChange(e){ checkboxChange(e) {
let value=e.detail.value let value = e.detail.value
let arr=[] let arr = []
value.forEach(item=>{ value.forEach(item => {
arr.push(JSON.parse(item)) arr.push(JSON.parse(item))
}) })
this.chooseProduct=arr this.chooseProduct = arr
//判断是否选中产品,选中产品的背景颜色需要变化 //判断是否选中产品,选中产品的背景颜色需要变化
this.scenicList.forEach(item=>{ this.scenicList.forEach(item => {
item.productList.forEach(item2=>{ item.productList.forEach(item2 => {
item2.ifChangeBg=false item2.ifChangeBg = false
this.chooseProduct.forEach(item3=>{ this.chooseProduct.forEach(item3 => {
if(item2.id==item3.id){ if (item2.id == item3.id) {
item2.ifChangeBg=true item2.ifChangeBg = true
//解决是否支持多产品购买弹窗2次之后,选中状态错误bug,需要在选中时修改状态 //解决是否支持多产品购买弹窗2次之后,选中状态错误bug,需要在选中时修改状态
item2.ifChecked=true item2.ifChecked = true
} }
}) })
}) })
}) })
}, },
//---不支持多选产品,选择确定事件 //---不支持多选产品,选择确定事件
chooseConfirm(){ chooseConfirm() {
this.chooseProduct.forEach((item,index)=>{ this.chooseProduct.forEach((item, index) => {
//删除选中产品以外的其他所有产品 //删除选中产品以外的其他所有产品
if(this.chooseMerchantProduct.merchantId==item.merchantId&&JSON.stringify(item)!=JSON.stringify(this.chooseMerchantProduct)){ if (this.chooseMerchantProduct.merchantId == item.merchantId && JSON.stringify(item) != JSON.stringify(this.chooseMerchantProduct)) {
//取消选中状态和选中背景颜色 //取消选中状态和选中背景颜色
this.scenicList.forEach(item2=>{ this.scenicList.forEach(item2 => {
item2.productList.forEach(item3=>{ item2.productList.forEach(item3 => {
if(item.id==item3.id){ if (item.id == item3.id) {
item3.ifChecked=false item3.ifChecked = false
item3.ifChangeBg=false item3.ifChangeBg = false
} }
}) })
}) })
delete this.chooseProduct[index] delete this.chooseProduct[index]
} }
}) })
this.chooseProduct=this.chooseProduct.filter(function (val) { this.chooseProduct = this.chooseProduct.filter(function (val) {
return val return val
}) })
this.showModal=false this.showModal = false
}, },
//---不支持多选产品,选择取消事件 //---不支持多选产品,选择取消事件
chooseCancel(){ chooseCancel() {
//删除选中产品 //删除选中产品
this.chooseProduct.forEach((item,index)=>{ this.chooseProduct.forEach((item, index) => {
if(item.id===this.chooseMerchantProduct.id){ if (item.id === this.chooseMerchantProduct.id) {
//取消选中状态和选中背景颜色 //取消选中状态和选中背景颜色
this.scenicList.forEach(item2=>{ this.scenicList.forEach(item2 => {
item2.productList.forEach(item3=>{ item2.productList.forEach(item3 => {
if(item.id==item3.id){ if (item.id == item3.id) {
item3.ifChecked=false item3.ifChecked = false
item3.ifChangeBg=false item3.ifChangeBg = false
} }
}) })
}) })
this.chooseProduct.splice(index,1) this.chooseProduct.splice(index, 1)
} }
}) })
this.showModal=false this.showModal = false
}, },
//---商品列表 //---商品列表
initList(latitude,longitude) { initList(latitude, longitude) {
let data = { let data = {
merchantId: this.merchantId, //商户id merchantId: this.merchantId, //商户id
openid:uni.getStorageSync('openid')||'', openid: uni.getStorageSync('openid') || '',
channelType:this.channelType,//渠道类型
latitude, latitude,
longitude longitude
} }
this.$request('/scenic/groupGood/getGroupProducts', data).then(res => { this.$request('/scenic/groupGood/getGroupProducts', data).then(res => {
if (res.code == '00') { if (res.code == '00') {
this.scenicList = res.data.merchantList||[] this.scenicList = res.data.merchantList || []
this.groupId=res.data.groupId||'' this.groupId = res.data.groupId || ''
this.groupChannelId=res.data.groupChannelId||'' this.groupChannelId = res.data.groupChannelId || ''
this.scenicList.forEach((item,index)=>{ this.scenicList.forEach((item, index) => {
//获取当前景区图片,把当前景区放在第一位 //获取当前景区图片,把当前景区放在第一位
if(item.id==this.merchantId){ if (item.id == this.merchantId) {
this.imgList=item.imgList this.imgList = item.imgList
this.scenicList.splice(index,1) this.scenicList.splice(index, 1)
this.scenicList.unshift(item) this.scenicList.unshift(item)
item.productListCopy=item.productList item.productListCopy = item.productList
}else{ } else {
item.productListCopy=item.productList.slice(0,2) item.productListCopy = item.productList.slice(0, 2)
} }
//预订时间为当天时,当前时间大于最早预订时间显示未开售,当前时间大于最晚预订时间显示已售罄 //预订时间为当天时,当前时间大于最早预订时间显示未开售,当前时间大于最晚预订时间显示已售罄
let times = new Date().Format('hh:mm:ss') let times = new Date().Format('hh:mm:ss')
let timeNumber = parseInt(this.$commonjs.changeTime(times)) //将当前时间转化为数字 let timeNumber = parseInt(this.$commonjs.changeTime(times)) //将当前时间转化为数字
item.productList.forEach(item2=>{ item.productList.forEach(item2 => {
item2.timeNumber1 = parseInt(this.$commonjs.changeTime(item2.earlyBookTime)) item2.timeNumber1 = parseInt(this.$commonjs.changeTime(item2.earlyBookTime))
item2.timeNumber2 = parseInt(this.$commonjs.changeTime(item2.bookTime)) item2.timeNumber2 = parseInt(this.$commonjs.changeTime(item2.bookTime))
if(item2.aheadBookDays==0){ if (item2.aheadBookDays == 0) {
if(item2.status==2){ if (item2.status == 2) {
item2.statusName='已售罄' item2.statusName = '已售罄'
}else{ } else {
if(timeNumber<item2.timeNumber1){ if (timeNumber < item2.timeNumber1) {
item2.status=2 item2.status = 2
item2.statusName='未开售' item2.statusName = '未开售'
} }
if(timeNumber>item2.timeNumber2){ if (timeNumber > item2.timeNumber2) {
item2.status=2 item2.status = 2
item2.statusName='已售罄' item2.statusName = '已售罄'
} }
} }
} }
}) })
}) })
} else { } else {
uni.showToast({ uni.showToast({
title: res.message, title: res.message,
icon: 'none' icon: 'none'
}) })
} }
}) })
}, },
//---跳转填写订单页面 //---跳转填写订单页面
goFillorder(){ goFillorder() {
for (let i = 0; i < this.chooseProduct.length; i++) { for (let i = 0; i < this.chooseProduct.length; i++) {
let item = this.chooseProduct[i] let item = this.chooseProduct[i]
if (item.status == 2) { if (item.status == 2) {
uni.showToast({ uni.showToast({
title: '售罄产品不能进行购买', title: '售罄产品不能进行购买',
icon: 'none' icon: 'none'
}) })
return return
} }
} }
if (this.chooseProduct.length == 0) { if (this.chooseProduct.length == 0) {
uni.showToast({ uni.showToast({
title: '请选择至少一个产品', title: '请选择至少一个产品',
icon: 'none' icon: 'none'
}) })
return return
} else if (this.chooseProduct.length == 1) { } else if (this.chooseProduct.length == 1) {
let query='?merchantId='+this.chooseProduct[0].merchantId+'&productId='+this.chooseProduct[0].id+'&orderSource=3' let query = '?merchantId=' + this.chooseProduct[0].merchantId + '&productId=' + this.chooseProduct[0].id + '&orderSource=3'
if(this.chooseProduct[0].ticketType==2){//联票 if (this.chooseProduct[0].ticketType == 2) {
//联票
uni.navigateTo({
url: '/pages/scenic/scenicJointOrder/scenicJointOrder' + query
})
} else {
//普通票
uni.navigateTo({ uni.navigateTo({
url:'/pages/scenic/scenicJointOrder/scenicJointOrder'+query url: '/pages/scenic/scenicSingleOrder/scenicSingleOrder' + query
}) })
}else{//普通票 }
uni.navigateTo({
url:'/pages/scenic/scenicSingleOrder/scenicSingleOrder'+query
})
}
} else { } else {
let productIdList = this.chooseProduct.map((item) => { let productIdList = this.chooseProduct.map(item => {
return item.id return item.id
}) })
let query='?productIdList='+JSON.stringify(productIdList)+'&groupId='+this.groupId+'&groupChannelId='+this.groupChannelId+'&orderSource=3' let query =
uni.navigateTo({ '?productIdList=' + JSON.stringify(productIdList) + '&groupId=' + this.groupId + '&groupChannelId=' + this.groupChannelId + '&orderSource=3'
url:'/pages/combination/combiOrder/combiOrder'+query uni.navigateTo({
}) url: '/pages/combination/combiOrder/combiOrder' + query
})
} }
} }
} }
...@@ -441,13 +433,13 @@ export default { ...@@ -441,13 +433,13 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.wrap{ .wrap {
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
background: #fff; background: #fff;
} }
.middle{ .middle {
position: relative; position: relative;
top: -40rpx; top: -40rpx;
padding: 0 24rpx 60rpx 24rpx; padding: 0 24rpx 60rpx 24rpx;
...@@ -455,91 +447,91 @@ export default { ...@@ -455,91 +447,91 @@ export default {
flex-direction: column; flex-direction: column;
flex: 1; flex: 1;
} }
.swiper-box{ .swiper-box {
flex: 1; flex: 1;
} }
.tabbar{ .tabbar {
background: #fff; background: #fff;
border-radius: 16rpx; border-radius: 16rpx;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
font-size: 32rpx; font-size: 32rpx;
text{ text {
padding:24rpx 32rpx 24rpx 20rpx; padding: 24rpx 32rpx 24rpx 20rpx;
border-radius: 16rpx; border-radius: 16rpx;
} }
} }
.tabbar .on{ .tabbar .on {
background: url('../../../static/img/scenic/tabbar.png') no-repeat; background: url('../../../static/img/scenic/tabbar.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
color: #fff; color: #fff;
font-weight: bold; font-weight: bold;
} }
.merchant{ .merchant {
border-radius: 16rpx; border-radius: 16rpx;
background: #FFFFFF; background: #ffffff;
box-shadow: 0px 0px 8px 2px rgba(0,0,0,0.08); box-shadow: 0px 0px 8px 2px rgba(0, 0, 0, 0.08);
margin-top: 24rpx; margin-top: 24rpx;
padding: 24rpx; padding: 24rpx;
} }
.merchant label.off .product{ .merchant label.off .product {
background: #F3F3F3; background: #f3f3f3;
} }
.merchant-title{ .merchant-title {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
padding-bottom: 16rpx; padding-bottom: 16rpx;
} }
.title-left{ .title-left {
font-size: 32rpx; font-size: 32rpx;
margin-right: 10rpx; margin-right: 10rpx;
font-weight: bold; font-weight: bold;
image{ image {
width: 36rpx; width: 36rpx;
height: 36rpx; height: 36rpx;
position: relative; position: relative;
top: 6rpx; top: 6rpx;
margin:0 8rpx; margin: 0 8rpx;
} }
} }
.title-coupon{ .title-coupon {
color: $red; color: $red;
font-size: 24rpx; font-size: 24rpx;
} }
.title-right{ .title-right {
color: $grey; color: $grey;
font-size: 24rpx; font-size: 24rpx;
} }
.product{ .product {
padding:10rpx 16rpx; padding: 10rpx 16rpx;
background: #ffffff; background: #ffffff;
border-radius: 8rpx; border-radius: 8rpx;
display: flex; display: flex;
align-items: center; align-items: center;
margin-top: 10rpx; margin-top: 10rpx;
} }
.product.on{ .product.on {
background: #E2EEFF; background: #e2eeff;
} }
.product-left{ .product-left {
margin-right: 10rpx; margin-right: 10rpx;
} }
.product-right{ .product-right {
flex: 1; flex: 1;
} }
.product-name{ .product-name {
font-size: 28rpx; font-size: 28rpx;
font-weight: bold; font-weight: bold;
color: #191919; color: #191919;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.product-status{ .product-status {
padding: 6rpx 12rpx; padding: 6rpx 12rpx;
border: 2px solid #F40000; border: 2px solid #f40000;
background: #ffffff; background: #ffffff;
color: #F40000; color: #f40000;
font-size: 24rpx; font-size: 24rpx;
border-radius: 4rpx; border-radius: 4rpx;
transform: rotate(-25deg); transform: rotate(-25deg);
...@@ -547,15 +539,15 @@ export default { ...@@ -547,15 +539,15 @@ export default {
top: 30rpx; top: 30rpx;
right: 80rpx; right: 80rpx;
} }
.product-price{ .product-price {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
} }
.product-rule{ .product-rule {
color: $blue; color: $blue;
} }
.product-rule::after{ .product-rule::after {
display: inline-block; display: inline-block;
content: ''; content: '';
height: 22rpx; height: 22rpx;
...@@ -563,23 +555,23 @@ export default { ...@@ -563,23 +555,23 @@ export default {
background: #ccc; background: #ccc;
width: 1px; width: 1px;
} }
.product-orange{ .product-orange {
font-size: 20rpx; font-size: 20rpx;
color:$grey; color: $grey;
text-decoration:line-through; text-decoration: line-through;
} }
.product-sell{ .product-sell {
font-size: 40rpx; font-size: 40rpx;
color: $red; color: $red;
font-weight: bold; font-weight: bold;
margin-left: 10rpx; margin-left: 10rpx;
} }
.product-more{ .product-more {
padding: 10rpx; padding: 10rpx;
text-align: center; text-align: center;
} }
.bottom{ .bottom {
position: fixed; position: fixed;
bottom: 0; bottom: 0;
width: 100%; width: 100%;
...@@ -592,45 +584,45 @@ export default { ...@@ -592,45 +584,45 @@ export default {
justify-content: space-between; justify-content: space-between;
padding: 0 32rpx; padding: 0 32rpx;
} }
.bottom-middle{ .bottom-middle {
position: relative; position: relative;
padding: 0 40rpx; padding: 0 40rpx;
} }
.bottom-more{ .bottom-more {
position: relative; position: relative;
top: -40rpx; top: -40rpx;
background: #F40000; background: #f40000;
border-radius: 28px; border-radius: 28px;
opacity: 0.64; opacity: 0.64;
padding: 10rpx 20rpx; padding: 10rpx 20rpx;
color: #ffffff; color: #ffffff;
} }
.bottom-three{ .bottom-three {
width: 14rpx; width: 14rpx;
height: 14rpx; height: 14rpx;
display: inline-block; display: inline-block;
background: #F40000; background: #f40000;
opacity: 0.64; opacity: 0.64;
position: absolute; position: absolute;
right: 42rpx; right: 42rpx;
bottom: -7rpx; bottom: -7rpx;
transform:rotate(45deg); transform: rotate(45deg);
} }
.bottom-detail{ .bottom-detail {
position: relative; position: relative;
text-align: center; text-align: center;
} }
.bottom-number{ .bottom-number {
display: inline-block; display: inline-block;
width: 36rpx; width: 36rpx;
height: 36rpx; height: 36rpx;
border-radius: 50%; border-radius: 50%;
text-align: center; text-align: center;
background: #F40000; background: #f40000;
color: #ffffff; color: #ffffff;
font-weight: bold; font-weight: bold;
} }
.btn{ .btn {
padding: 16rpx 48rpx; padding: 16rpx 48rpx;
border-radius: 20rpx; border-radius: 20rpx;
font-size: 32rpx; font-size: 32rpx;
......
...@@ -24,24 +24,26 @@ export default { ...@@ -24,24 +24,26 @@ export default {
if(this.enterUrl){//普通二维码扫码进入 if(this.enterUrl){//普通二维码扫码进入
let merchantId=this.getUrlKey('merchantId') let merchantId=this.getUrlKey('merchantId')
let companyId=this.getUrlKey('companyId') let companyId=this.getUrlKey('companyId')
let channelType=this.getUrlKey('channelType')
let pdOpenid=uni.getStorageSync('openid')//胖丁小程序openid,临时用,当公众号授权做好之后可以删除 let pdOpenid=uni.getStorageSync('openid')//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let pdToken=uni.getStorageSync('token') let pdToken=uni.getStorageSync('token')
let pdCreateUserId=uni.getStorageSync('createUserId') let pdCreateUserId=uni.getStorageSync('createUserId')
let pdUserId=uni.getStorageSync('userId') let pdUserId=uni.getStorageSync('userId')
let baseUrl='https://wx.pangdly.com/#/scenicProduct?pdOpenid='+pdOpenid+'&pdToken='+pdToken+'&pdCreateUserId='+pdCreateUserId+'&pdUserId='+pdUserId let baseUrl='https://wx.pangdly.com/#/scenicProduct?pdOpenid='+pdOpenid+'&pdToken='+pdToken+'&pdCreateUserId='+pdCreateUserId+'&pdUserId='+pdUserId
let url='&merchantId='+merchantId+'&companyId='+companyId let url='&merchantId='+merchantId+'&companyId='+companyId+'&channelType='+channelType
this.outUrl=baseUrl+url this.outUrl=baseUrl+url
}else{//小程序页面跳转进入 }else{//小程序页面跳转进入
let merchantId=option.merchantId||'' let merchantId=option.merchantId||''
let companyId=option.companyId||'' let companyId=option.companyId||''
let channelType=option.channelType||0
let ifyukuaiCode=option.ifyukuaiCode||''//是否是渝快码跳入,渝快码跳入需要在H5端另外走流程 let ifyukuaiCode=option.ifyukuaiCode||''//是否是渝快码跳入,渝快码跳入需要在H5端另外走流程
let pdOpenid=uni.getStorageSync('openid')//胖丁小程序openid,临时用,当公众号授权做好之后可以删除 let pdOpenid=uni.getStorageSync('openid')//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let pdToken=uni.getStorageSync('token') let pdToken=uni.getStorageSync('token')
let pdCreateUserId=uni.getStorageSync('createUserId') let pdCreateUserId=uni.getStorageSync('createUserId')
let pdUserId=uni.getStorageSync('userId') let pdUserId=uni.getStorageSync('userId')
let baseUrl='https://wx.pangdly.com/#/scenicProduct?pdOpenid='+pdOpenid+'&pdToken='+pdToken+'&pdCreateUserId='+pdCreateUserId+'&pdUserId='+pdUserId let baseUrl='https://wx.pangdly.com/#/scenicProduct?pdOpenid='+pdOpenid+'&pdToken='+pdToken+'&pdCreateUserId='+pdCreateUserId+'&pdUserId='+pdUserId
let url='&merchantId='+merchantId+'&companyId='+companyId+'&ifyukuaiCode='+ifyukuaiCode let url='&merchantId='+merchantId+'&companyId='+companyId+'&ifyukuaiCode='+ifyukuaiCode+'&channelType='+channelType
this.outUrl=baseUrl+url this.outUrl=baseUrl+url
} }
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment