|
@@ -2,10 +2,10 @@
|
|
|
<view class="box">
|
|
|
<view class="spwBox">
|
|
|
<swiper class="swiper" circular :autoplay="false" :indicator-dots="true" indicator-color="#CCCCCC" indicator-active-color="#D53533">
|
|
|
- <swiper-item v-for="(item,index) in info.ImgList">
|
|
|
+ <swiper-item v-for="(item,index) in info.imgList">
|
|
|
<view class="swiper-item">
|
|
|
- <img mode="aspectFit" :src="item.url" alt="" class="swiper-itemImg" v-if="item.bizType==1">
|
|
|
- <video :src="item.url" v-if="item.bizType==2" show-fullscreen-btn controls style="width: 100%;height: 100%;"></video>
|
|
|
+ <img mode="aspectFit" :src="item.img" alt="" class="swiper-itemImg" v-if="item.imgType==1">
|
|
|
+ <video :src="item.url" v-if="item.imgType==2" show-fullscreen-btn controls style="width: 100%;height: 100%;"></video>
|
|
|
</view>
|
|
|
</swiper-item>
|
|
|
|
|
@@ -13,9 +13,9 @@
|
|
|
</view>
|
|
|
<view class="shopCont">
|
|
|
<view class="goodsName">{{info.name}}</view>
|
|
|
- <view class="jfNumBox">
|
|
|
- <span class="jfspan1">759</span> <span class="jfspan2">积分</span>
|
|
|
- <span class="marketvalue">市场价 ¥893</span>
|
|
|
+ <view class="jfNumBox" style="padding-left: 24rpx;">
|
|
|
+ <span class="jfspan1">{{info.integral}}</span> <span class="jfspan2">积分</span>
|
|
|
+ <span class="marketvalue">市场价 ¥{{info.salePrice}}</span>
|
|
|
</view>
|
|
|
|
|
|
|
|
@@ -30,7 +30,7 @@
|
|
|
<view style="height: 120rpx;padding-bottom: env(safe-area-inset-bottom)"></view>
|
|
|
|
|
|
<view class="bottomBox">
|
|
|
- <view class="ktyong">可用 <span class="ktyong1">759</span><span class="ktyong2">积分</span> </view>
|
|
|
+ <view class="ktyong">可用 <span class="ktyong1">{{avaIntegral}}</span><span class="ktyong2">积分</span> </view>
|
|
|
<view class="bottomBtn" @click="ljbuy">立即兑换</view>
|
|
|
|
|
|
</view>
|
|
@@ -44,17 +44,17 @@
|
|
|
<view class="goodsBox">
|
|
|
<view class="hotGoodsLine" >
|
|
|
<view>
|
|
|
- <image :src="info.ImgList[0].url" mode="" v-if="info.ImgList.length>0" class="hotGoodsLineImg"></image>
|
|
|
+ <image :src="info.imgList[0].img" mode="" v-if="info.imgList.length>0" class="hotGoodsLineImg"></image>
|
|
|
<image src="../../static/timg/noimg.png" class="hotGoodsLineImg" v-else></image>
|
|
|
</view>
|
|
|
<view class="hotGoodsLineRIght">
|
|
|
<view class="goodsName2">{{info.name}}</view>
|
|
|
<view class="goodsPriceTk">
|
|
|
<view class="jfNumBox">
|
|
|
- <span class="jfspan1">759</span> <span class="jfspan2">积分</span>
|
|
|
- <span class="marketvalue">市场价 ¥893</span>
|
|
|
+ <span class="jfspan1">{{info.integral}}</span> <span class="jfspan2">积分</span>
|
|
|
+ <span class="marketvalue">市场价 ¥{{info.salePrice}}</span>
|
|
|
</view>
|
|
|
- <view class="surplus">剩余999个</view>
|
|
|
+ <view class="surplus">剩余{{shopInfo.qty}}个</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -63,7 +63,7 @@
|
|
|
<view class="bugNUm">
|
|
|
<view class="bugNUmLeft">
|
|
|
<view class="buySl">数量</view>
|
|
|
- <view class="buyXg" v-if="info.oneQty">限购{{info.oneQty}}件</view>
|
|
|
+ <!-- <view class="buyXg" v-if="info.oneQty">限购{{info.oneQty}}件</view> -->
|
|
|
</view>
|
|
|
<view class="numJsbox">
|
|
|
<view class="numJj" @click="calculation(1)">-</view>
|
|
@@ -73,18 +73,27 @@
|
|
|
<view class="numJj" @click="calculation(2)">+</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="buySHop" @click="ckShop">
|
|
|
+ <view class="buySHop" @click="ckShop" style="border-bottom: 1px solid #EEEEEE;">
|
|
|
<view>服务门店</view>
|
|
|
<view class="buyShopRight" >
|
|
|
<view v-if="shopInfo.shopId">{{shopInfo.shopName}}</view>
|
|
|
<view v-else>请选择</view>
|
|
|
<image src="../../static/timg/icon_arrow_right.png" mode="" class="buyShopRightJt"></image>
|
|
|
</view>
|
|
|
+ </view>
|
|
|
+ <view class="buySHop">
|
|
|
+ <view>兑换限制</view>
|
|
|
+ <view class="buyShopRight" >
|
|
|
+ 每人限兑{{info.oneCount}}个,每天限兑{{info.dayCount}}个
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
- <view class="buybtnBox">
|
|
|
- <view class="buyBtn" @click="goBuy">立即购买</view>
|
|
|
+ <view class="buybtnBox">
|
|
|
+ <view class="ktyong"><view>合计 <span class="ktyong1">{{totalIntegral}}</span><span class="ktyong2">积分</span> </view>
|
|
|
+ <view class="kyNum">可用积分:{{avaIntegral}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="bottomBtn" @click="goBuy">立即兑换</view>
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
@@ -101,7 +110,24 @@
|
|
|
<image src="../../static/timg/icon_guanbi@2x.png" mode="" class="authorizCloseImg"></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
-<!-- <view :style="{color:colorX}">asdfas</view> -->
|
|
|
+<!-- <view :style="{color:colorX}">asdfas</view> -->
|
|
|
+ <!-- 门店弹框 -->
|
|
|
+ <view class="baomingBox ckshopBox" v-if="ckshopShow">
|
|
|
+ <view class="baomingCont">
|
|
|
+ <view class="bmTop">
|
|
|
+ <view class="bmTitle">选择门店</view>
|
|
|
+ <img src="../../static/timg/chahao.png" alt="" class="bmChimg" @click="noShowShop">
|
|
|
+ </view>
|
|
|
+ <view style="padding: 0 24rpx; height: 45vh;overflow-y: scroll;">
|
|
|
+ <view class="ckshopLine" v-for="(item,index) in info.shopList" @click="ckshop2(item)">
|
|
|
+ <view class="shopName"> {{item.shopName}}</view>
|
|
|
+ <view class="surplus" style="padding-top: 2rpx;">剩余{{item.qty?item.qty:0}}个</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -114,7 +140,7 @@
|
|
|
return {
|
|
|
userInfo:'',
|
|
|
goodsnum:1,
|
|
|
- buyShow:true,
|
|
|
+ buyShow:false,
|
|
|
id:'',
|
|
|
info:'',
|
|
|
shopInfo:{
|
|
@@ -131,12 +157,16 @@
|
|
|
shengyuD:1,
|
|
|
shengyuH:12,
|
|
|
shengyuM:21,
|
|
|
+ totalIntegral:'',
|
|
|
+ avaIntegral:'',
|
|
|
+ ckshopShow:true,
|
|
|
//snapup:
|
|
|
}
|
|
|
},
|
|
|
onLoad(opt) {
|
|
|
this.id=opt.id;
|
|
|
- this.id='F58D6DEA-726A-4E28-93FA-EE6E5D6E3BDF'
|
|
|
+ this.avaIntegral=opt.avaIntegral;
|
|
|
+ //this.id='F58D6DEA-726A-4E28-93FA-EE6E5D6E3BDF'
|
|
|
//this.userInfo = uni.getStorageSync("userInfo");
|
|
|
this.userInfo=this.$store.state.userInfo;
|
|
|
this.ext=this.$common.getExtStoreId();
|
|
@@ -156,7 +186,7 @@
|
|
|
|
|
|
},
|
|
|
onShow() {
|
|
|
- this.shopInfo=this.$store.state.ckshopInfo;
|
|
|
+ //this.shopInfo=this.$store.state.ckshopInfo;
|
|
|
|
|
|
//console.log(this.shopInfo)
|
|
|
},
|
|
@@ -169,71 +199,32 @@
|
|
|
methods: {
|
|
|
sharewx(){
|
|
|
|
|
|
+ },
|
|
|
+ noShowShop(){
|
|
|
+ this.ckshopShow=false;
|
|
|
},
|
|
|
ckShop(){
|
|
|
- uni.navigateTo({
|
|
|
- url:'ckshopList?goodsId='+this.id
|
|
|
- })
|
|
|
+ this.ckshopShow=true;
|
|
|
+ },
|
|
|
+ ckshop2(item){
|
|
|
+ this.ckshopShow=false;
|
|
|
},
|
|
|
openGoodsDetailById(){
|
|
|
- this.$http('openMall/openGoodsDetailById', {
|
|
|
- id:this.id,
|
|
|
- GoodsID:this.id,
|
|
|
+ this.$http('openIntegralMall/integralGoodsDetailById', {
|
|
|
+ id:this.id,
|
|
|
},'GET').then(res => {
|
|
|
this.info=res.data;
|
|
|
if(this.info.details){
|
|
|
this.info.details = this.info.details.replace(/\<img/gi, '<img style="max-width:100%;height:auto" ');
|
|
|
}
|
|
|
- this.shopInfo='';
|
|
|
- this.$store.commit('mutationsckshopInfo', '')
|
|
|
- this.szShop()
|
|
|
- if(this.info.goodsDownTime){
|
|
|
- if (Number(new Date().getTime()) > (Number(new Date(this.info.goodsDownTime.replace(/-/g, '/')).getTime()) || 0)) {
|
|
|
- console.log("现在时间大于结束时间")
|
|
|
- this.activityEnd = true
|
|
|
- } else {
|
|
|
- this.activityEnd=false;
|
|
|
- //this.info.goodsDownTime="2022-08-18 11:57:00"
|
|
|
- this.clock()
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
+ this.shopInfo=res.data.shopList[0];
|
|
|
+ this.totalIntegral=this.goodsnum*this.info.integral
|
|
|
+ //this.$store.commit('mutationsckshopInfo', '')
|
|
|
+ //this.szShop()
|
|
|
|
|
|
})
|
|
|
},
|
|
|
- clock(){
|
|
|
-
|
|
|
- let _this = this
|
|
|
- let today = new Date() // 当前时间
|
|
|
- let h = today.getHours()
|
|
|
- let m = today.getMinutes()
|
|
|
- let s = today.getSeconds()
|
|
|
- let stopTime = new Date(_this.info.goodsDownTime.replace(/-/g, '/')) // 结束时间
|
|
|
- if (Number(new Date().getTime()) >(Number(new Date(this.info.goodsDownTime.replace(/-/g, '/')).getTime()) || 0) ) {
|
|
|
- this.activityEnd = true
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- let stopH = stopTime.getHours()
|
|
|
- let stopM = stopTime.getMinutes()
|
|
|
- let stopS = stopTime.getSeconds()
|
|
|
- let shenyu = stopTime.getTime() - today.getTime() // 倒计时毫秒数
|
|
|
- let shengyuD = parseInt(shenyu / (60 * 60 * 24 * 1000)) // 转换为天
|
|
|
- let D = parseInt(shenyu) - parseInt(shengyuD * 60 * 60 * 24 * 1000)// 除去天的毫秒数
|
|
|
- let shengyuH = parseInt(D / (60 * 60 * 1000)) // 除去天的毫秒数转换成小时
|
|
|
- let H = D - shengyuH * 60 * 60 * 1000 // 除去天、小时的毫秒数
|
|
|
- let shengyuM = parseInt(H / (60 * 1000)) // 除去天的毫秒数转换成分钟
|
|
|
- let M = H - shengyuM * 60 * 1000// 除去天、小时、分的毫秒数
|
|
|
- let S = parseInt((shenyu - shengyuD * 60 * 60 * 24 * 1000 - shengyuH * 60 * 60 * 1000 - shengyuM * 60 * 1000) / 1000)// 除去天、小时、分的毫秒数转化为秒
|
|
|
-
|
|
|
- this.daojishi = '报名倒计时:' + shengyuD + '天' + shengyuH + '小时' + shengyuM + '分' + S + '秒'
|
|
|
- // setTimeout("clock()",500);
|
|
|
- this.shengyuM=shengyuM;
|
|
|
- this.shengyuD=shengyuD;
|
|
|
- this.shengyuH=shengyuH;
|
|
|
- setTimeout(_this.clock, 500)
|
|
|
- },
|
|
|
+
|
|
|
ljbuy(){
|
|
|
if(!this.userInfo){
|
|
|
this.authorizShow=true
|
|
@@ -242,30 +233,7 @@
|
|
|
}
|
|
|
|
|
|
},
|
|
|
- szShop(){
|
|
|
- if(this.userInfo){
|
|
|
- this.$http('openMall/openStoreList', {
|
|
|
- goodsId:this.id,
|
|
|
- // lat: '',
|
|
|
- // lng: '',
|
|
|
- }, 'GET').then(res => {
|
|
|
-
|
|
|
- var queryShopList = res.data
|
|
|
- //console.log('list+=', this.queryShopList);
|
|
|
- queryShopList.forEach(item=>{
|
|
|
- if(item.shopId==this.info.shopId){
|
|
|
- var item={
|
|
|
- shopId:this.info.shopId,
|
|
|
- shopName:this.info.shopName
|
|
|
- }
|
|
|
- this.shopInfo=item
|
|
|
- this.$store.commit('mutationsckshopInfo', item)
|
|
|
- }
|
|
|
- })
|
|
|
- })
|
|
|
- }
|
|
|
-
|
|
|
- },
|
|
|
+
|
|
|
goINdex(){
|
|
|
uni.switchTab({
|
|
|
url:'../index/index'
|
|
@@ -281,15 +249,16 @@
|
|
|
return false;
|
|
|
}
|
|
|
var that=this;
|
|
|
- uni.setStorage({
|
|
|
- key: 'goodsDetail',
|
|
|
- data: that.info,
|
|
|
- success: function () {
|
|
|
+
|
|
|
+ uni.setStorage({
|
|
|
+ key: 'jfgoodsDetail',
|
|
|
+ data: that.info,
|
|
|
+ success: function () {
|
|
|
uni.navigateTo({
|
|
|
- url:'confirm?itemQty='+that.goodsnum+'&shopID='+that.shopInfo.shopId+'&shopName='+that.shopInfo.shopName
|
|
|
- })
|
|
|
- }
|
|
|
- });
|
|
|
+ url:'integralConfirm?shopID='+that.shopInfo.shopId+'&shopName='+that.shopInfo.shopName+'&goodsnum='+that.goodsnum+'&avaIntegral='+that.avaIntegral
|
|
|
+ })
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
},
|
|
|
calculation(type){
|
|
@@ -298,16 +267,26 @@
|
|
|
this.goodsnum--
|
|
|
}
|
|
|
}else{
|
|
|
- console.log("+++")
|
|
|
- if(this.info.oneQty!=null){
|
|
|
- if(this.info.oneQty>this.goodsnum){
|
|
|
+ //console.log("+++")
|
|
|
+ if(this.goodsnum<this.info.dayCount){
|
|
|
+ if(this.goodsnum<this.shopInfo.qty){
|
|
|
this.goodsnum++
|
|
|
+ }else{
|
|
|
+ uni.showToast({
|
|
|
+ title:'剩余个数不足',
|
|
|
+ icon:'none',
|
|
|
+ })
|
|
|
}
|
|
|
+
|
|
|
}else{
|
|
|
- this.goodsnum++
|
|
|
+ uni.showToast({
|
|
|
+ title:'超过兑换限制',
|
|
|
+ icon:'none',
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
- }
|
|
|
+ }
|
|
|
+ this.totalIntegral=this.goodsnum*this.info.integral
|
|
|
},
|
|
|
decryptPhoneNumber: function(e) {
|
|
|
console.log(e);
|
|
@@ -363,15 +342,70 @@
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="less">
|
|
|
+ .ckshopLine{
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ padding: 20rpx 0;
|
|
|
+ border-bottom: 1px solid #EEEEEE;
|
|
|
+ }
|
|
|
+ .shopName{
|
|
|
+ font-size: 28rpx;
|
|
|
+ color: #333333;
|
|
|
+ width: 500rpx;
|
|
|
+ }
|
|
|
+ .ckshopBox{
|
|
|
+ width: 750rpx;
|
|
|
+ height: 100vh;
|
|
|
+ background: rgba(0, 0, 0, 0.4);
|
|
|
+ position: fixed;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ z-index: 111 !important;
|
|
|
+ }
|
|
|
+ .baomingCont{
|
|
|
+ position: absolute;
|
|
|
+ width: 750rpx;
|
|
|
+ /* height:850rpx; */
|
|
|
+ /* padding-bottom: constant(safe-area-inset-bottom);
|
|
|
+ padding-bottom: env(safe-area-inset-bottom); */
|
|
|
+ left: 0;
|
|
|
+ bottom: 0;
|
|
|
+ background: #ffffff;
|
|
|
+ border-radius: 24rpx 24rpx 0px 0px;
|
|
|
+ }
|
|
|
+ .bmTop{
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ padding: 40rpx 24rpx 10rpx 24rpx;
|
|
|
+ }
|
|
|
+ .bmTitle{
|
|
|
+ font-weight: 500;
|
|
|
+ color: #3C3C3C;
|
|
|
+ font-size: 30rpx;
|
|
|
+ line-height: 36rpx;
|
|
|
+ }
|
|
|
+ .bmChimg{
|
|
|
+ width: 36rpx;
|
|
|
+ height: 36rpx;
|
|
|
+ }
|
|
|
+ .kyNum{
|
|
|
+ color: #999999;
|
|
|
+ font-size: 24rpx;
|
|
|
+ }
|
|
|
+ .goodsPriceTk{
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ width: 460rpx;
|
|
|
+ }
|
|
|
.surplus{
|
|
|
- color: #FF0000;font-size: 24rpx;
|
|
|
+ color: #FF0000;font-size: 24rpx;padding-top: 6rpx;
|
|
|
}
|
|
|
.ktyong{
|
|
|
- line-height: 45px;
|
|
|
font-weight: 500;
|
|
|
color: #666666;
|
|
|
font-size: 24rpx;
|
|
|
padding-left: 30rpx;
|
|
|
+ padding-top: 18rpx;
|
|
|
}
.ktyong1{
|
|
|
color: #FF0000;
|
|
|
font-size: 32rpx;
|
|
@@ -385,7 +419,7 @@
|
|
|
color: #FF0000;
|
|
|
font-size:32rpx;
|
|
|
line-height: 45rpx;
|
|
|
- padding-left: 20rpx;
|
|
|
+
|
|
|
}
|
|
|
.jfspan2{
|
|
|
font-weight: 400;
|
|
@@ -456,14 +490,16 @@
|
|
|
justify-content: space-between;
|
|
|
font-size:28rpx ;
|
|
|
color: #666666;
|
|
|
- padding-top: 30rpx;
|
|
|
+ padding-top: 30rpx;
|
|
|
+ padding-bottom: 30rpx;
|
|
|
}
|
|
|
.buybtnBox{
|
|
|
width: 750rpx;
|
|
|
height: 120rpx;
|
|
|
background: #FFFFFF;
|
|
|
box-shadow: 0px -2px 10px 0px rgba(153,153,153,0.2000);
|
|
|
- padding-top: 20rpx;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
}
|
|
|
.buyBox{
|
|
|
width: 750rpx;
|
|
@@ -556,14 +592,14 @@
|
|
|
left: 0;
|
|
|
bottom: 0;
|
|
|
width: 750rpx;
|
|
|
- height: 688rpx;
|
|
|
+ /* height: 688rpx; */
|
|
|
background: #FFFFFF;
|
|
|
border-radius: 26rpx 26rpx 0px 0px;
|
|
|
}
|
|
|
.buyNumBox{
|
|
|
padding: 30rpx;
|
|
|
padding-top: 10rpx;
|
|
|
- padding-bottom: 70rpx;
|
|
|
+
|
|
|
}
|
|
|
.buyContCh{
|
|
|
position: absolute;
|
|
@@ -603,7 +639,10 @@
|
|
|
width: 370rpx;
|
|
|
}
|
|
|
.hotGoodsLineRIght{
|
|
|
- padding-left: 24rpx;
|
|
|
+ padding-left: 24rpx;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: space-between;
|
|
|
}
|
|
|
.goodsPrice{
|
|
|
display: flex;
|