Commit 511db54d authored by Mac's avatar Mac

1

parent 110ada4a
...@@ -774,7 +774,10 @@ ...@@ -774,7 +774,10 @@
storeId: res.data.storeInfo.storeId storeId: res.data.storeInfo.storeId
}); });
if (res.data.storeInfo.storeId && res.data.storeInfo.storeId > 0) { if (res.data.storeInfo.storeId && res.data.storeInfo.storeId > 0) {
this.init() setTimeout((x)=>{
this.init()
},1000)
} }
} }
} }
......
...@@ -650,7 +650,7 @@ ...@@ -650,7 +650,7 @@
this.u = uni.getStorageSync("mall_UserInfo"); this.u = uni.getStorageSync("mall_UserInfo");
if (this.u) { if (this.u) {
uni.navigateTo({ uni.navigateTo({
url: "/pages/reserve/subscribe?id=" + this.storeId+'&servicePersionId='+x.ID, url: "/pages/reserve/subscribe?id=" + this.storeId+'&servicePersionId='+this.ID,
}) })
} else { } else {
this.showAuth = true; this.showAuth = true;
......
...@@ -470,7 +470,7 @@ ...@@ -470,7 +470,7 @@
暂无设计师数据~ 暂无设计师数据~
</view> </view>
</view> </view>
<view class="title-c" @click="gocomment()"> <view class="title-c classcomment" @click="gocomment()" >
<text> <text>
评价{{count>0?'('+count+')':''}} 评价{{count>0?'('+count+')':''}}
...@@ -722,7 +722,7 @@ ...@@ -722,7 +722,7 @@
this.designerH = res.top this.designerH = res.top
} }
}) })
this.$utils.getRect('.comment').then(res => { this.$utils.getRect('.classcomment').then(res => {
if(res && res.top){ if(res && res.top){
this.commentH = res.top this.commentH = res.top
} }
...@@ -848,7 +848,7 @@ ...@@ -848,7 +848,7 @@
}) })
}else if(e==2){ }else if(e==2){
uni.pageScrollTo({ uni.pageScrollTo({
scrollTop: that.commentH - that.headH -40-30 scrollTop: that.commentH - that.headH -40
}) })
}else if(e==3){ }else if(e==3){
uni.pageScrollTo({ uni.pageScrollTo({
......
...@@ -224,6 +224,31 @@ ...@@ -224,6 +224,31 @@
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
} }
.subscribe .popupBox {
width: 100%;
padding-bottom: 15px;
}
.subscribe .popupBox .popup_top {
width: 100%;
height: 45px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
padding: 0 15px;
}
.subscribe .popupBox .txtype {}
.subscribe .typeitem {
padding: 15px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
border-top: 1px solid #f5f5f5
}
</style> </style>
<template> <template>
<view class="subscribe"> <view class="subscribe">
...@@ -328,6 +353,13 @@ ...@@ -328,6 +353,13 @@
<u-number-box v-model="value" :min="1" @change="valChange"></u-number-box> <u-number-box v-model="value" :min="1" @change="valChange"></u-number-box>
</view> </view>
<view class="info-item"> <view class="info-item">
<text class="info-i-l">付款方式</text>
<view @click="show=true" style="width: 200px;display: flex;flex-direction: row;align-items: center;justify-content: flex-end;">
<Text>{{payname}}</Text>
<u-icon name="arrow" color='#9F9F9F'></u-icon>
</view>
</view>
<view class="info-item" v-if="payId==2">
<text class="info-i-l">套餐卡</text> <text class="info-i-l">套餐卡</text>
<view class="right" > <view class="right" >
<text class="content" v-if="courseList.length>0 && Use_Education_Id==0" @click="showCourseHandler">选择套餐卡 <text class="content" v-if="courseList.length>0 && Use_Education_Id==0" @click="showCourseHandler">选择套餐卡
...@@ -350,7 +382,9 @@ ...@@ -350,7 +382,9 @@
</view> </view>
<view class="submit"> <view class="submit">
<view class="submit-l"> <view class="submit-l">
<text>定金:</text> <text v-if="payId==0">线下付款金额:</text>
<text v-if="payId==1">预付定金:</text>
<text v-if="payId==2">线上付款金额:</text>
<text :style="{'color':mainColor}">¥<text style='font-size: 20px;'>{{Income*value}}</text></text> <text :style="{'color':mainColor}">¥<text style='font-size: 20px;'>{{Income*value}}</text></text>
</view> </view>
<u-button <u-button
...@@ -405,6 +439,24 @@ ...@@ -405,6 +439,24 @@
</view> </view>
</u-popup> </u-popup>
<u-popup v-model="show" mode="bottom" border-radius="16">
<view class="popupBox">
<view class="popup_top">
<view></view>
<Text>付款方式</Text>
<u-icon name="cross" color='#9F9F9F' @click='show=false' size="40"></u-icon>
</view>
<view class="txtype">
<view class="typeitem" v-for="(item, index) in paymentList" :key="index">
<Text>{{item.name}}</Text>
<u-radio-group v-model="payId">
<u-radio :active-color="mainColor" shape="circle" :name="item.Id" @change="radioChange(item)">
</u-radio>
</u-radio-group>
</view>
</view>
</view>
</u-popup>
<packagecart v-if="courseList.length > 0 && showCourse" :list="courseList" :current="Use_Education_Id" @close="closeCourseHandler"></packagecart> <packagecart v-if="courseList.length > 0 && showCourse" :list="courseList" :current="Use_Education_Id" @close="closeCourseHandler"></packagecart>
</view> </view>
</template> </template>
...@@ -423,6 +475,7 @@ ...@@ -423,6 +475,7 @@
return { return {
pageTitle: "预约", pageTitle: "预约",
mainColor: "", mainColor: "",
show: false,
loading: true, loading: true,
submitOrder:false, submitOrder:false,
payExit: false, payExit: false,
...@@ -458,6 +511,10 @@ ...@@ -458,6 +511,10 @@
Income:0, Income:0,
EduCationMoney:0, EduCationMoney:0,
servicePersionId:0, servicePersionId:0,
paymentList:[],//付款方式的选择
payname:'线下付款',
payId:0,
}; };
}, },
...@@ -475,9 +532,7 @@ ...@@ -475,9 +532,7 @@
} }
if(option && option.servicePersionId){ if(option && option.servicePersionId){
this.servicePersionId = option.servicePersionId this.servicePersionId = option.servicePersionId
} }
this.payInfo.OpenId=uni.getStorageSync('mall_UserInfo').OpenId; this.payInfo.OpenId=uni.getStorageSync('mall_UserInfo').OpenId;
}, },
...@@ -561,7 +616,7 @@ ...@@ -561,7 +616,7 @@
ProductList.push(obj); ProductList.push(obj);
//获取套餐卡的处理 //获取套餐卡的处理
this.Use_Education_Id=0, this.Use_Education_Id=0,
this.Income = this.goods.price; this.Income =this.payId==1?this.goods.depositMoney: this.goods.price;
this.EduCationMoney= 0; this.EduCationMoney= 0;
this.request2({ this.request2({
...@@ -607,6 +662,30 @@ ...@@ -607,6 +662,30 @@
this.designerList.unshift(obj) this.designerList.unshift(obj)
this.selectdesigner= this.designerList[0].Gender; this.selectdesigner= this.designerList[0].Gender;
let set = uni.getStorageSync("basedata") ? uni.getStorageSync("basedata").mall.offlineServiceSetting.offlineServicePayType : [];
if(set.length>0){
this.paymentList=[]
set.forEach(x=>{
if(x==1){
//data有默认值 这里不做处理
let obj = {name:'线下付款',Id:0};
this.paymentList.push(obj)
}else if(x==2){
let obj
if(this.goods.depositMoney>0){//预定金额大于0
obj =[{name:'预付定金',Id:1},{name:'线上付款',Id:2}]
}else{
obj =[{name:'线上付款',Id:2}]
}
this.paymentList= this.paymentList.concat(obj)
}
})
}
this.payname = this.paymentList[0].name;
this.payId = this.paymentList[0].Id;
this.schoolCoupon();//获取套餐卡 this.schoolCoupon();//获取套餐卡
this.Nosubmit = false; this.Nosubmit = false;
} }
...@@ -654,8 +733,8 @@ ...@@ -654,8 +733,8 @@
data: form data: form
}, },
res => { res => {
if (res.resultCode == 1) { if (res.resultCode == 1 ) {
if(form.Income>0){ if(form.Income>0 || this.payId!=0){
that.submitOrder = false; that.submitOrder = false;
that.payBtn = true; that.payBtn = true;
that.payInfo.OrderId = res.data.OrderId; that.payInfo.OrderId = res.data.OrderId;
...@@ -731,7 +810,13 @@ ...@@ -731,7 +810,13 @@
goodsdetails(){//商品详情 goodsdetails(){//商品详情
uni.navigateTo({ url: "/pages/reserve/goodsDetails?GoodsId=" + this.goods.id }); uni.navigateTo({ url: "/pages/reserve/goodsDetails?GoodsId=" + this.goods.id });
} },
radioChange(item) {
this.payname=item.name;
this.payId=item.Id;
this.Income =this.payId==1?this.goods.depositMoney: this.goods.price;
this.show = false;
},
}, },
}; };
</script> </script>
......
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