diff --git a/src/component/filteredShopComponent/filteredShopComponent.js b/src/component/filteredShopComponent/filteredShopComponent.js
index cda10c5..dcbf4e3 100644
--- a/src/component/filteredShopComponent/filteredShopComponent.js
+++ b/src/component/filteredShopComponent/filteredShopComponent.js
@@ -35,7 +35,8 @@ class recommondShop extends Component {
voucherResponseMsg: 'i am voucherResponseMsg',
userName: Taro.getStorageSync('user_identity').username || '',
userPhone: Taro.getStorageSync('user_identity').userphone || '',
- canConsult: false
+ isCanConsult: true,
+ isCanVoucher: true
}
}
@@ -76,7 +77,7 @@ class recommondShop extends Component {
.then(res => {
this.setState({
voucherResponseMsg: res.data.tips,
- canConsult: res.data.canConsult,
+ isCanVoucher: res.data.canConsult,
})
console.log('优惠卷请求', res)
})
@@ -113,7 +114,7 @@ class recommondShop extends Component {
}
})
.then(res => {
- this.setState({ consultTip: res.data.tips })
+ this.setState({ consultTip: res.data.tips,isCanConsult:res.data.canConsult })
console.log('咨询请求', res)
})
}
@@ -122,7 +123,8 @@ class recommondShop extends Component {
phone = this.state.userPhone,
shops = [this.props.shop.shop_id],
source_type = "2",
- source_level = 1,
+ source_level = this.props.categoryLevel,
+ source_class = this.props.classId === '-1' ? '' : this.props.classId,
coupons_flag = 0 }) {
Taro.request({
url: URL.BuyConsult,
@@ -135,6 +137,7 @@ class recommondShop extends Component {
shops: shops,
source_type: source_type,
source_level: source_level,
+ source_class: source_class,
coupons_flag: coupons_flag,
})
},
@@ -187,8 +190,9 @@ class recommondShop extends Component {
} else {
this.setState({ isOpenConsult: false })
- this.buyConsult({ user: this.state.userName, phone: this.state.userPhone })
+ this.buyConsult({})
}
+
}
handleInputCsultName(e) {
@@ -215,7 +219,6 @@ class recommondShop extends Component {
//console.log(this.props, nextProps)
}
componentDidMount() {
- console.log('this.props', this.props)
}
componentWillUnmount() { }
@@ -279,10 +282,13 @@ class recommondShop extends Component {
/>
-
+
+
+
+
-// {this.props.canConsult?:}
+ // {this.props.canConsult?:}
return (
@@ -291,12 +297,13 @@ class recommondShop extends Component {
name={this.state.userName}
phone={this.state.userPhone}
shopId={this.props.shop.shop_id}
- canConsult={this.state.canConsult}
+ isCanVoucher={this.state.isCanVoucher}
isVoucherPoster={this.state.isOpenVoucher}
onPassDataToChild={this.getDataFromChild.bind(this)}
voucherLeft={this.props.shop.left_nums}
voucherResponseMsg={this.state.voucherResponseMsg}
categoryLevel={this.props.categoryLevel}
+ classId={this.props.classId === '-1' ? '' : this.props.classId}
>
diff --git a/src/component/filteredShopComponent/filteredShopComponent.scss b/src/component/filteredShopComponent/filteredShopComponent.scss
index 8612f4a..049d1f2 100644
--- a/src/component/filteredShopComponent/filteredShopComponent.scss
+++ b/src/component/filteredShopComponent/filteredShopComponent.scss
@@ -5,6 +5,12 @@ $linearBlue:linear-gradient(to right, #337ab7, #337ab7);
border-radius: 3px;
box-shadow: 0 5px 5px #ddd;
margin-bottom: 10px;
+ .confirm_button{
+ color:#FF7142!important
+ }
+ .blur{
+ opacity: 0.5
+ }
.voucher-modal{
background-color: black;
diff --git a/src/component/filteredShopComponent/voucherPosterComponent/voucherPosterComponent.js b/src/component/filteredShopComponent/voucherPosterComponent/voucherPosterComponent.js
index a9a287d..c6a9803 100644
--- a/src/component/filteredShopComponent/voucherPosterComponent/voucherPosterComponent.js
+++ b/src/component/filteredShopComponent/voucherPosterComponent/voucherPosterComponent.js
@@ -30,6 +30,7 @@ class VoucherPoster extends Component {
shops = [this.props.shopId],
source_type = '4',
source_level = this.props.categoryLevel,
+ source_class = this.props.classId,
coupons_flag = '1' }) {
Taro.request({
url: URL.BuyConsult,
@@ -43,6 +44,7 @@ class VoucherPoster extends Component {
source_type: source_type,
source_level: source_level,
coupons_flag: coupons_flag,
+ source_class: source_class
})
},
header: {
@@ -55,7 +57,7 @@ class VoucherPoster extends Component {
console.log('购买咨询请求成功', res)
if (res.data.err_code === 0) {
Taro.showToast({
- title: '领取成功',
+ title: '咨询成功',
icon: 'success',
duration: 1500
})
@@ -150,7 +152,7 @@ class VoucherPoster extends Component {
-
+
diff --git a/src/component/filteredShopComponent/voucherPosterComponent/voucherPosterComponent.scss b/src/component/filteredShopComponent/voucherPosterComponent/voucherPosterComponent.scss
index 8f24fcf..470c9ee 100644
--- a/src/component/filteredShopComponent/voucherPosterComponent/voucherPosterComponent.scss
+++ b/src/component/filteredShopComponent/voucherPosterComponent/voucherPosterComponent.scss
@@ -41,6 +41,7 @@ $linearOrange:linear-gradient(to right, #FF7142, #FF7142);
min-height:100%;
+
.close-icon{
margin-left:88%;
margin-top:2%;
@@ -100,7 +101,9 @@ $linearOrange:linear-gradient(to right, #FF7142, #FF7142);
font-size: 28px;
background:$linearOrange;
padding: 12rpx;
-
+ }
+ .blur{
+ opacity: 0.5;
}
}
.declare{