|
@@ -11,7 +11,7 @@
|
|
|
<view class="shopBox">
|
|
|
<view class="shopBoxTop">
|
|
|
<view class="shopMs">活动门店</view>
|
|
|
- <view class="shopTy">
|
|
|
+ <view class="shopTy" @click="useShow">
|
|
|
<view class="shopTyTxt">{{info.shopCount}}家门店通用</view>
|
|
|
<img src="../../static/timg/jt2.png" alt="" class="shopjt">
|
|
|
</view>
|
|
@@ -96,7 +96,7 @@
|
|
|
</button>
|
|
|
<!-- 状态1未开始 2进行中3已结束 -->
|
|
|
<view class="bottomBtn" v-if="info.state==2" @click="signUp">
|
|
|
- <span v-if="info.money">¥{{info.money}} 立即购买</span>
|
|
|
+ <span v-if="info.money">¥{{info.money}} 立即抢购</span>
|
|
|
<span v-else>立即报名</span>
|
|
|
</view>
|
|
|
<view class="bottomBtn2" v-if="info.state==1">报名未开始</view>
|
|
@@ -105,32 +105,36 @@
|
|
|
</view>
|
|
|
<!-- 报名弹框 -->
|
|
|
<view class="baomingBox" v-if="bmShow" @click="nobmshow">
|
|
|
- <view class="baomingCont" @click.stop="">
|
|
|
+ <view class="baomingCont" @click.stop="" :style="{bottom: jpHeight}">
|
|
|
<view class="bmTop">
|
|
|
<view class="bmTitle">登记信息</view>
|
|
|
<img src="../../static/timg/chahao.png" alt="" class="bmChimg" @click="nobmshow">
|
|
|
</view>
|
|
|
<view style="padding: 0 24rpx;">
|
|
|
<view class="bmshopLine" @click="showCkshop">
|
|
|
- <view class="bmshopname">{{shopName?shopName:'请选择门店'}}</view>
|
|
|
+ <view class="bmshopname">请选择门店</view>
|
|
|
+ <view class="bmshopname" style="color: #333333;">{{shopName}}</view>
|
|
|
<img src="../../static/timg/icon_arrow_right.png" alt="" class="bmshopjt">
|
|
|
</view>
|
|
|
<!-- clWhere报名凭证1,2,3,4 1手机号2车牌号3姓名4单位 -->
|
|
|
<view class="bmLine" v-if="info.clWhere.indexOf(1)!=-1" >
|
|
|
- <input type="text" v-model="mobilePhone" cursor-spacing="10" class="bmlineInput" placeholder="输入手机号">
|
|
|
+ <input type="text" v-model="mobilePhone" cursor-spacing="10" class="bmlineInput" placeholder="输入手机号" placeholder-style="color:#999999">
|
|
|
</view>
|
|
|
<view class="bmLine" v-if="info.clWhere.indexOf(2)!=-1">
|
|
|
- <input type="text" v-model="plateNumber" cursor-spacing="10" class="bmlineInput" placeholder="输入车牌号">
|
|
|
+ <input type="text" v-model="plateNumber" cursor-spacing="10" class="bmlineInput" placeholder="输入车牌号" placeholder-style="color:#999999">
|
|
|
</view>
|
|
|
<view class="bmLine" v-if="info.clWhere.indexOf(3)!=-1">
|
|
|
- <input type="text" v-model="customerName" cursor-spacing="10" class="bmlineInput" placeholder="输入姓名">
|
|
|
+ <input type="text" v-model="customerName" cursor-spacing="10" class="bmlineInput" placeholder="输入姓名" placeholder-style="color:#999999">
|
|
|
</view>
|
|
|
<view class="bmLine" v-if="info.clWhere.indexOf(4)!=-1">
|
|
|
- <input type="text" v-model="unit" cursor-spacing="10" class="bmlineInput" placeholder="输入单位">
|
|
|
+ <input type="text" v-model="unit" cursor-spacing="10" class="bmlineInput" placeholder="输入单位" placeholder-style="color:#999999">
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="bmTtnBox">
|
|
|
- <view class="bmBtn" @click="submitOrder">提交</view>
|
|
|
+ <view class="bmBtn" @click="submitOrder">
|
|
|
+ <span v-if="info.money">¥{{info.money}} 立即抢购</span>
|
|
|
+ <span v-else>立即报名</span>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -166,6 +170,40 @@
|
|
|
</view>
|
|
|
|
|
|
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <!-- 适用门店 -->
|
|
|
+ <view class="baomingBox ckshopBox" v-if="useShopShow" @click="noShowShop2">
|
|
|
+ <view class="baomingCont" @click.stop="">
|
|
|
+ <view class="bmTop">
|
|
|
+ <view class="bmTitle">选择门店</view>
|
|
|
+ <img src="../../static/timg/chahao.png" alt="" class="bmChimg" @click="noShowShop2">
|
|
|
+ </view>
|
|
|
+ <view style="padding: 0 24rpx; height: 45vh;overflow-y: scroll;">
|
|
|
+ <view class="ckshopLine" v-for="(item,index) in info.shopList" @click="ckshop(item)">
|
|
|
+ <view class="shoplineLeft">
|
|
|
+ <image :src="item.photoPath" mode="" class="shopImg" v-if="item.photoPath"></image>
|
|
|
+ <image src="../../static/img/noimg.png" mode="" class="shopImg" v-else></image>
|
|
|
+ </view>
|
|
|
+ <view class="shopright" style="padding-left: 20rpx;">
|
|
|
+ <view class="shopTop">
|
|
|
+ <view class="shopName">{{item.shopName}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="brandsBg" v-if="item.brands">
|
|
|
+ <view class="brands" v-for="(v,index2) in item.brands.split(',')">{{v}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="shopTime"><span v-if="item.startTime">{{item.startTime}}</span> - <span
|
|
|
+ v-if="item.endTime">{{item.endTime}}</span> </view>
|
|
|
+ <view class="shopBottomLeft">
|
|
|
+ <span class="shopaddress"
|
|
|
+ v-if="item.address">{{item.provinceName}}{{item.cityName}}{{item.areaName}}{{item.address}}</span>
|
|
|
+ <span v-if="item.distance&&item.distance!= '0.00'">{{item.distance}}km</span>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -198,6 +236,9 @@
|
|
|
plateNumber:'',
|
|
|
comment:'',
|
|
|
userInfo:'',
|
|
|
+ useShopShow:false,
|
|
|
+ jpHeight:0,
|
|
|
+ isPlay: false
|
|
|
}
|
|
|
},
|
|
|
onLoad(opt) {
|
|
@@ -205,19 +246,51 @@
|
|
|
if(this.userInfo){
|
|
|
this.collectingID=opt.id;
|
|
|
this.getInfo();
|
|
|
- this.queryActivityInfo()
|
|
|
+ this.queryActivityInfo();
|
|
|
+ this.queryGoodsLook()
|
|
|
}else{
|
|
|
this.$common.automaticlogin().then(val => {
|
|
|
this.userInfo=this.$store.state.userInfo;
|
|
|
|
|
|
this.collectingID=opt.id;
|
|
|
this.getInfo();
|
|
|
- this.queryActivityInfo()
|
|
|
+ this.queryActivityInfo();
|
|
|
+ this.queryGoodsLook()
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+ uni.onKeyboardHeightChange((obj)=>{
|
|
|
+ // 获取系统信息
|
|
|
+ let _sysInfo = uni.getSystemInfoSync();
|
|
|
+ let _heightDiff = _sysInfo.screenHeight - _sysInfo.windowHeight
|
|
|
+ let _diff = obj.height - _heightDiff
|
|
|
+ // 键盘高度
|
|
|
+ this.jpHeight = (_diff > 0 ? _diff : 0) - 2 + "px";
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
+ onPullDownRefresh(){
|
|
|
+ this.getInfo();
|
|
|
+ this.queryActivityInfo();
|
|
|
+ setTimeout(() => {
|
|
|
+ uni.stopPullDownRefresh(); // 关闭下拉刷新
|
|
|
+ }, 1000);
|
|
|
},
|
|
|
methods: {
|
|
|
+ queryGoodsLook(){
|
|
|
+ this.$http('openmy/queryGoodsLook', {
|
|
|
+ goodsId:this.collectingID,
|
|
|
+ openId:this.userInfo.openId
|
|
|
+ },'POST').then(res => {
|
|
|
+
|
|
|
+ })
|
|
|
+ },
|
|
|
+ noShowShop2(){
|
|
|
+ this.useShopShow=false;
|
|
|
+ },
|
|
|
+ useShow(){
|
|
|
+ this.useShopShow=true;
|
|
|
+ },
|
|
|
submitOrder(){
|
|
|
var jsonArray={
|
|
|
itemId:this.collectingID,
|
|
@@ -234,6 +307,38 @@
|
|
|
});
|
|
|
return false;
|
|
|
}
|
|
|
+ if(this.info.clWhere.indexOf(1)!=-1&&this.mobilePhone==''){
|
|
|
+ uni.showToast({
|
|
|
+ title: '请输入手机号',
|
|
|
+ icon: 'none',
|
|
|
+ duration: 3000
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if(this.info.clWhere.indexOf(2)!=-1&&this.plateNumber==''){
|
|
|
+ uni.showToast({
|
|
|
+ title: '请输入车牌号',
|
|
|
+ icon: 'none',
|
|
|
+ duration: 3000
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if(this.info.clWhere.indexOf(3)!=-1&&this.customerName==''){
|
|
|
+ uni.showToast({
|
|
|
+ title: '请输入姓名',
|
|
|
+ icon: 'none',
|
|
|
+ duration: 3000
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if(this.info.clWhere.indexOf(4)!=-1&&this.unit==''){
|
|
|
+ uni.showToast({
|
|
|
+ title: '请输入单位',
|
|
|
+ icon: 'none',
|
|
|
+ duration: 3000
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ }
|
|
|
var arr=[]
|
|
|
arr.push(jsonArray)
|
|
|
var params={
|
|
@@ -349,6 +454,7 @@
|
|
|
this.ckshopdata=item;
|
|
|
this.shopName=item.shopName;
|
|
|
this.ckshopShow=false;
|
|
|
+ this.shopInfo=item
|
|
|
},
|
|
|
showCkshop(){
|
|
|
console.log("选择门店")
|
|
@@ -399,9 +505,29 @@
|
|
|
if (this.activityNoOpen && !this.activityEnd) {
|
|
|
this.clock2()
|
|
|
}
|
|
|
+ // if(this.info.music){
|
|
|
+ // this.innerAudioContext = uni.createInnerAudioContext();
|
|
|
+ // this.playVoice(this.info.music.music)
|
|
|
+ // uni.$on('changePlay', isPlay => {
|
|
|
+ // this.playVoice(this.lastRecord, this.isPlay)
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+
|
|
|
|
|
|
})
|
|
|
},
|
|
|
+ playVoice(url, isPlay){
|
|
|
+ if (url) {
|
|
|
+ this.lastRecord = url; // 将路径赋值给定义的变量好做判断
|
|
|
+ this.innerAudioContext.src = url; // 配置音频播放路径
|
|
|
+ this.innerAudioContext.play(); // 播放
|
|
|
+ this.innerAudioContext.loop = true; // 是否循环播放
|
|
|
+ }
|
|
|
+ this.isPlay = !this.isPlay;
|
|
|
+ if (isPlay) {
|
|
|
+ this.innerAudioContext.pause(); // 停止
|
|
|
+ }
|
|
|
+ },
|
|
|
getInfo(){
|
|
|
this.$http('openreservation/getInfo', {
|
|
|
lat: '',
|
|
@@ -590,7 +716,7 @@
|
|
|
}
|
|
|
.bmshopname{
|
|
|
font-weight: 400;
|
|
|
- color: #333333;
|
|
|
+ color: #999999;
|
|
|
font-size: 28rpx;
|
|
|
line-height: 40rpx;
|
|
|
width: 500rpx;
|
|
@@ -625,7 +751,7 @@
|
|
|
.baomingCont{
|
|
|
position: absolute;
|
|
|
width: 750rpx;
|
|
|
- height:770rpx;
|
|
|
+ height:850rpx;
|
|
|
padding-bottom: constant(safe-area-inset-bottom);
|
|
|
padding-bottom: env(safe-area-inset-bottom);
|
|
|
left: 0;
|
|
@@ -702,7 +828,7 @@
|
|
|
color: #FFFFFF;
|
|
|
width: 41rpx;
|
|
|
text-align: center;
|
|
|
- background: #FF4F00;
|
|
|
+ background: #F03B3B;
|
|
|
border-radius: 6rpx;
|
|
|
margin-top: 9rpx;
|
|
|
margin-left: 15rpx;
|
|
@@ -839,7 +965,7 @@
|
|
|
margin-top: 20rpx;
|
|
|
}
|
|
|
.detailTitle{
|
|
|
- color: #3C3C3C;
|
|
|
+ color: #222222;
|
|
|
font-weight: 500;
|
|
|
padding: 20rpx 24rpx;
|
|
|
font-size: 30rpx;
|
|
@@ -856,7 +982,7 @@
|
|
|
.shopBox{
|
|
|
background: #ffffff;
|
|
|
margin-top: 20rpx;
|
|
|
- padding: 20rpx 34rpx;
|
|
|
+ padding: 20rpx 24rpx;
|
|
|
}
|
|
|
.shopBoxTop{
|
|
|
display: flex;
|