|
@@ -19,7 +19,7 @@
|
|
<view class="shopCont">
|
|
<view class="shopCont">
|
|
<view class="shopContLeft">
|
|
<view class="shopContLeft">
|
|
<view class="shopName">{{shopInfo.shopName}}</view>
|
|
<view class="shopName">{{shopInfo.shopName}}</view>
|
|
- <view class="shopaddress">{{shopInfo.address}}</view>
|
|
|
|
|
|
+ <view class="shopaddress">{{shopInfo.address?shopInfo.address:''}}</view>
|
|
</view>
|
|
</view>
|
|
<view class="shopContRight">
|
|
<view class="shopContRight">
|
|
<view class="shopContRightLine" @click="getmap">
|
|
<view class="shopContRightLine" @click="getmap">
|
|
@@ -112,22 +112,22 @@
|
|
</view>
|
|
</view>
|
|
<view style="padding: 0 24rpx;">
|
|
<view style="padding: 0 24rpx;">
|
|
<view class="bmshopLine" @click="showCkshop">
|
|
<view class="bmshopLine" @click="showCkshop">
|
|
- <view class="bmshopname">请选择门店</view>
|
|
|
|
|
|
+ <view class="bmshopname" v-if="!shopName">请选择门店</view>
|
|
<view class="bmshopname" style="color: #333333;">{{shopName}}</view>
|
|
<view class="bmshopname" style="color: #333333;">{{shopName}}</view>
|
|
<img src="../../static/timg/icon_arrow_right.png" alt="" class="bmshopjt">
|
|
<img src="../../static/timg/icon_arrow_right.png" alt="" class="bmshopjt">
|
|
</view>
|
|
</view>
|
|
<!-- clWhere报名凭证1,2,3,4 1手机号2车牌号3姓名4单位 -->
|
|
<!-- clWhere报名凭证1,2,3,4 1手机号2车牌号3姓名4单位 -->
|
|
<view class="bmLine" v-if="info.clWhere.indexOf(1)!=-1" >
|
|
<view class="bmLine" v-if="info.clWhere.indexOf(1)!=-1" >
|
|
- <input type="text" v-model="mobilePhone" cursor-spacing="10" class="bmlineInput" placeholder="输入手机号" placeholder-style="color:#999999">
|
|
|
|
|
|
+ <input type="text" adjust-position="false" @blur="inputBindBlur" @focus="inputBindFocus" v-model="mobilePhone" class="bmlineInput" placeholder="输入手机号" placeholder-style="color:#999999">
|
|
</view>
|
|
</view>
|
|
<view class="bmLine" v-if="info.clWhere.indexOf(2)!=-1">
|
|
<view class="bmLine" v-if="info.clWhere.indexOf(2)!=-1">
|
|
- <input type="text" v-model="plateNumber" cursor-spacing="10" class="bmlineInput" placeholder="输入车牌号" placeholder-style="color:#999999">
|
|
|
|
|
|
+ <input type="text" adjust-position="false" @blur="inputBindBlur" @focus="inputBindFocus" v-model="plateNumber" class="bmlineInput" placeholder="输入车牌号" placeholder-style="color:#999999">
|
|
</view>
|
|
</view>
|
|
<view class="bmLine" v-if="info.clWhere.indexOf(3)!=-1">
|
|
<view class="bmLine" v-if="info.clWhere.indexOf(3)!=-1">
|
|
- <input type="text" v-model="customerName" cursor-spacing="10" class="bmlineInput" placeholder="输入姓名" placeholder-style="color:#999999">
|
|
|
|
|
|
+ <input type="text" adjust-position="false" @blur="inputBindBlur" @focus="inputBindFocus" v-model="customerName" class="bmlineInput" placeholder="输入姓名" placeholder-style="color:#999999">
|
|
</view>
|
|
</view>
|
|
<view class="bmLine" v-if="info.clWhere.indexOf(4)!=-1">
|
|
<view class="bmLine" v-if="info.clWhere.indexOf(4)!=-1">
|
|
- <input type="text" v-model="unit" cursor-spacing="10" class="bmlineInput" placeholder="输入单位" placeholder-style="color:#999999">
|
|
|
|
|
|
+ <input type="text" adjust-position="false" @blur="inputBindBlur" @focus="inputBindFocus" v-model="unit" class="bmlineInput" placeholder="输入单位" placeholder-style="color:#999999">
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="bmTtnBox">
|
|
<view class="bmTtnBox">
|
|
@@ -206,6 +206,8 @@
|
|
|
|
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
+ <img src="../../static/timg/mp3.png" class="mp3Img" @click="play()" v-if="!payshow&mp3Url!=''">
|
|
|
|
+ <img src=".../../static/timg/mp31.png" class="mp3Img" @click="play2()" id="bofang" v-if="payshow&mp3Url!=''">
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -237,8 +239,10 @@
|
|
comment:'',
|
|
comment:'',
|
|
userInfo:'',
|
|
userInfo:'',
|
|
useShopShow:false,
|
|
useShopShow:false,
|
|
- jpHeight:0,
|
|
|
|
- isPlay: false
|
|
|
|
|
|
+ jpHeight:'279px',
|
|
|
|
+ isPlay: false,
|
|
|
|
+ mp3Url:'',
|
|
|
|
+ payshow:false,
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onLoad(opt) {
|
|
onLoad(opt) {
|
|
@@ -259,15 +263,19 @@
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
- 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";
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
|
|
+ // 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";
|
|
|
|
+ // })
|
|
|
|
+
|
|
|
|
+ this.shopckList= uni.getStorageSync("shopckList");
|
|
|
|
+ //this.ckmusic=uni.getStorageSync("ckmusic");
|
|
|
|
+
|
|
|
|
+
|
|
},
|
|
},
|
|
onPullDownRefresh(){
|
|
onPullDownRefresh(){
|
|
this.getInfo();
|
|
this.getInfo();
|
|
@@ -276,7 +284,37 @@
|
|
uni.stopPullDownRefresh(); // 关闭下拉刷新
|
|
uni.stopPullDownRefresh(); // 关闭下拉刷新
|
|
}, 1000);
|
|
}, 1000);
|
|
},
|
|
},
|
|
|
|
+ onHide(){
|
|
|
|
+ this.bgmMusic.stop(()=>{
|
|
|
|
+
|
|
|
|
+ console.log('背景音乐停止了');
|
|
|
|
+
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ onUnload(){
|
|
|
|
+ this.bgmMusic.stop()
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
|
|
+ inputBindFocus(e){
|
|
|
|
+ console.log( e.detail.height);
|
|
|
|
+ //this.jpHeight=e.detail.height+ "px";
|
|
|
|
+ console.log(this.jpHeight)
|
|
|
|
+ },
|
|
|
|
+ inputBindBlur(){
|
|
|
|
+ uni.onKeyboardHeightChange((obj)=>{
|
|
|
|
+ // 获取系统信息
|
|
|
|
+ let _sysInfo = uni.getSystemInfoSync();
|
|
|
|
+ let _heightDiff = _sysInfo.screenHeight - _sysInfo.windowHeight
|
|
|
|
+ let _diff = obj.height - _heightDiff;
|
|
|
|
+ console.log(_diff)
|
|
|
|
+ if(_diff<0||_diff==0){
|
|
|
|
+ this.jpHeight=0
|
|
|
|
+ }
|
|
|
|
+ // 键盘高度
|
|
|
|
+ //this.jpHeight = (_diff > 0 ? _diff : 0) - 2 + "px";
|
|
|
|
+ })
|
|
|
|
+ //this.jpHeight=0
|
|
|
|
+ },
|
|
queryGoodsLook(){
|
|
queryGoodsLook(){
|
|
this.$http('openmy/queryGoodsLook', {
|
|
this.$http('openmy/queryGoodsLook', {
|
|
goodsId:this.collectingID,
|
|
goodsId:this.collectingID,
|
|
@@ -296,8 +334,8 @@
|
|
itemId:this.collectingID,
|
|
itemId:this.collectingID,
|
|
itemName:this.info.activityName,
|
|
itemName:this.info.activityName,
|
|
itemQty:1,
|
|
itemQty:1,
|
|
- salePrice:this.info.money,
|
|
|
|
- totalPrice:this.info.money,
|
|
|
|
|
|
+ salePrice:this.info.money?this.info.money:0,
|
|
|
|
+ totalPrice:this.info.money?this.info.money:0,
|
|
}
|
|
}
|
|
if(this.ckshopdata==''){
|
|
if(this.ckshopdata==''){
|
|
uni.showToast({
|
|
uni.showToast({
|
|
@@ -349,7 +387,7 @@
|
|
unit:this.unit,
|
|
unit:this.unit,
|
|
plateNumber:this.plateNumber,
|
|
plateNumber:this.plateNumber,
|
|
//carModel:this.carInfo.carModel,
|
|
//carModel:this.carInfo.carModel,
|
|
- totalMoney:this.info.money,
|
|
|
|
|
|
+ totalMoney:this.info.money?this.info.money:0,
|
|
shopId:this.ckshopdata.id,
|
|
shopId:this.ckshopdata.id,
|
|
comment:this.comment,
|
|
comment:this.comment,
|
|
sheetDetail:JSON.stringify(arr),
|
|
sheetDetail:JSON.stringify(arr),
|
|
@@ -445,6 +483,14 @@
|
|
});
|
|
});
|
|
},
|
|
},
|
|
signUp(){
|
|
signUp(){
|
|
|
|
+ this.info.shopList.forEach(item=>{
|
|
|
|
+ if(item.id == this.shopInfo.id){
|
|
|
|
+ this.ckshopdata=item;
|
|
|
|
+ this.shopName=item.shopName;
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+
|
|
this.bmShow=true;
|
|
this.bmShow=true;
|
|
},
|
|
},
|
|
nobmshow(){
|
|
nobmshow(){
|
|
@@ -455,10 +501,12 @@
|
|
this.shopName=item.shopName;
|
|
this.shopName=item.shopName;
|
|
this.ckshopShow=false;
|
|
this.ckshopShow=false;
|
|
this.shopInfo=item
|
|
this.shopInfo=item
|
|
|
|
+ this.useShopShow=false;
|
|
},
|
|
},
|
|
showCkshop(){
|
|
showCkshop(){
|
|
console.log("选择门店")
|
|
console.log("选择门店")
|
|
this.ckshopShow=true;
|
|
this.ckshopShow=true;
|
|
|
|
+
|
|
},
|
|
},
|
|
noShowShop(){
|
|
noShowShop(){
|
|
this.ckshopShow=false;
|
|
this.ckshopShow=false;
|
|
@@ -505,28 +553,35 @@
|
|
if (this.activityNoOpen && !this.activityEnd) {
|
|
if (this.activityNoOpen && !this.activityEnd) {
|
|
this.clock2()
|
|
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)
|
|
|
|
- // })
|
|
|
|
- // }
|
|
|
|
-
|
|
|
|
|
|
+ if(this.info.music){
|
|
|
|
+ this.bgmMusic = uni.createInnerAudioContext();
|
|
|
|
+ this.bgmMusic.autoplay = true;//自动播放
|
|
|
|
+ this.bgmMusic.loop = true;//循环播放
|
|
|
|
+ this.mp3Url='http://dmsimg.66km.com/music/sakuratears.mp3';
|
|
|
|
+ this.bgmMusic.src ='http://dmsimg.66km.com/music/sakuratears.mp3'//, mp3Url;//背景音乐地址
|
|
|
|
+ this.bgmMusic.onPlay(function(){
|
|
|
|
+ console.log('背景音乐播放中');
|
|
|
|
+ });
|
|
|
|
+ this.bgmMusic.onError((res) => {
|
|
|
|
+ console.log(res.errMsg);
|
|
|
|
+ console.log(res.errCode);
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- 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(); // 停止
|
|
|
|
- }
|
|
|
|
|
|
+ play2(){
|
|
|
|
+ this.bgmMusic.play();
|
|
|
|
+ this.payshow=false;
|
|
|
|
+ },
|
|
|
|
+ play(){
|
|
|
|
+ this.payshow=true;
|
|
|
|
+ this.bgmMusic.stop(()=>{
|
|
|
|
+
|
|
|
|
+ console.log('背景音乐停止了');
|
|
|
|
+
|
|
|
|
+ });
|
|
},
|
|
},
|
|
getInfo(){
|
|
getInfo(){
|
|
this.$http('openreservation/getInfo', {
|
|
this.$http('openreservation/getInfo', {
|
|
@@ -661,6 +716,14 @@
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
<style scoped>
|
|
|
|
+ .mp3Img{
|
|
|
|
+ /* transform: translate(-1584.4%, 121.5%) scale(1); */
|
|
|
|
+ position: fixed;
|
|
|
|
+ top: 40rpx;
|
|
|
|
+ right: 40rpx;
|
|
|
|
+ width: 60rpx;
|
|
|
|
+ height: 60rpx;
|
|
|
|
+ }
|
|
.ckshopBox{
|
|
.ckshopBox{
|
|
z-index: 111 !important;
|
|
z-index: 111 !important;
|
|
}
|
|
}
|