Showing
11 changed files
with
200 additions
and
35 deletions
| @@ -74,6 +74,7 @@ Page({ | @@ -74,6 +74,7 @@ Page({ | ||
| 74 | n: 0, | 74 | n: 0, |
| 75 | modal: '', | 75 | modal: '', |
| 76 | couponModal: '', | 76 | couponModal: '', |
| 77 | + give_user:'', | ||
| 77 | /** | 78 | /** |
| 78 | * 生命周期函数--监听页面加载 | 79 | * 生命周期函数--监听页面加载 |
| 79 | */ | 80 | */ |
| @@ -337,6 +338,7 @@ Page({ | @@ -337,6 +338,7 @@ Page({ | ||
| 337 | phone: reserev.phone, | 338 | phone: reserev.phone, |
| 338 | } | 339 | } |
| 339 | }) | 340 | }) |
| 341 | + this.give_user = reserev.give_user ? reserev.give_user : '2'; | ||
| 340 | console.log('reserev信息', reserev); | 342 | console.log('reserev信息', reserev); |
| 341 | console.log('seller信息', this.data.seller); | 343 | console.log('seller信息', this.data.seller); |
| 342 | console.log('detail信息', this.data.detail); | 344 | console.log('detail信息', this.data.detail); |
| @@ -1118,8 +1120,21 @@ Page({ | @@ -1118,8 +1120,21 @@ Page({ | ||
| 1118 | let freeCoupons = list.filter(item => { | 1120 | let freeCoupons = list.filter(item => { |
| 1119 | return item.is_type == '3' | 1121 | return item.is_type == '3' |
| 1120 | }) | 1122 | }) |
| 1123 | + let give = this.give_user; | ||
| 1124 | + let couponShow = false; | ||
| 1125 | + switch (give) { | ||
| 1126 | + case '1': | ||
| 1127 | + couponShow = this.data.options.hasSellerShare == '1' ? true : false; | ||
| 1128 | + break; | ||
| 1129 | + case '2': | ||
| 1130 | + couponShow = true; | ||
| 1131 | + break; | ||
| 1132 | + case '3': | ||
| 1133 | + couponShow = this.data.options.hasSellerShare != '1' ? true : false; | ||
| 1134 | + break; | ||
| 1135 | + } | ||
| 1121 | // 免费券判断是否领取,弹框领取 | 1136 | // 免费券判断是否领取,弹框领取 |
| 1122 | - if (freeCoupons.length > 0) { | 1137 | + if (freeCoupons.length > 0 && couponShow) { |
| 1123 | this.getCoupon(freeCoupons,obj,setcoupon) | 1138 | this.getCoupon(freeCoupons,obj,setcoupon) |
| 1124 | } | 1139 | } |
| 1125 | console.log('邀请函--------------------优惠券', list); | 1140 | console.log('邀请函--------------------优惠券', list); |
| @@ -77,6 +77,7 @@ Page({ | @@ -77,6 +77,7 @@ Page({ | ||
| 77 | n: 0, | 77 | n: 0, |
| 78 | modal: '', | 78 | modal: '', |
| 79 | couponModal: '', | 79 | couponModal: '', |
| 80 | + give_user:'', | ||
| 80 | /** | 81 | /** |
| 81 | * 生命周期函数--监听页面加载 | 82 | * 生命周期函数--监听页面加载 |
| 82 | */ | 83 | */ |
| @@ -356,6 +357,7 @@ Page({ | @@ -356,6 +357,7 @@ Page({ | ||
| 356 | phone: reserev.phone, | 357 | phone: reserev.phone, |
| 357 | } | 358 | } |
| 358 | }) | 359 | }) |
| 360 | + this.give_user = reserev.give_user ? reserev.give_user : '2'; | ||
| 359 | console.log('reserev信息', reserev); | 361 | console.log('reserev信息', reserev); |
| 360 | console.log('seller信息', this.data.seller); | 362 | console.log('seller信息', this.data.seller); |
| 361 | console.log('detail信息', this.data.detail); | 363 | console.log('detail信息', this.data.detail); |
| @@ -1195,8 +1197,21 @@ Page({ | @@ -1195,8 +1197,21 @@ Page({ | ||
| 1195 | entry.sort((a, b) => a.id - b.id); | 1197 | entry.sort((a, b) => a.id - b.id); |
| 1196 | } | 1198 | } |
| 1197 | } | 1199 | } |
| 1200 | + let give = this.give_user; | ||
| 1201 | + let couponShow = false; | ||
| 1202 | + switch (give) { | ||
| 1203 | + case '1': | ||
| 1204 | + couponShow = this.data.options.hasSellerShare == '1' ? true : false; | ||
| 1205 | + break; | ||
| 1206 | + case '2': | ||
| 1207 | + couponShow = true; | ||
| 1208 | + break; | ||
| 1209 | + case '3': | ||
| 1210 | + couponShow = this.data.options.hasSellerShare != '1' ? true : false; | ||
| 1211 | + break; | ||
| 1212 | + } | ||
| 1198 | // 免费券判断是否领取,弹框领取 | 1213 | // 免费券判断是否领取,弹框领取 |
| 1199 | - if (freeCoupons.length > 0) { | 1214 | + if (freeCoupons.length > 0 && couponShow) { |
| 1200 | this.getCoupon(freeCoupons,obj,setcoupon) | 1215 | this.getCoupon(freeCoupons,obj,setcoupon) |
| 1201 | } | 1216 | } |
| 1202 | console.log('邀请函--------------------优惠券', list); | 1217 | console.log('邀请函--------------------优惠券', list); |
| @@ -80,6 +80,7 @@ Page({ | @@ -80,6 +80,7 @@ Page({ | ||
| 80 | modal: '', | 80 | modal: '', |
| 81 | publicModal: '', | 81 | publicModal: '', |
| 82 | couponModal: '', | 82 | couponModal: '', |
| 83 | + give_user:'', | ||
| 83 | /** | 84 | /** |
| 84 | * 生命周期函数--监听页面加载 | 85 | * 生命周期函数--监听页面加载 |
| 85 | */ | 86 | */ |
| @@ -364,6 +365,7 @@ Page({ | @@ -364,6 +365,7 @@ Page({ | ||
| 364 | phone: reserev.phone, | 365 | phone: reserev.phone, |
| 365 | } | 366 | } |
| 366 | }) | 367 | }) |
| 368 | + this.give_user = reserev.give_user ? reserev.give_user : '2'; | ||
| 367 | console.log('reserev信息', reserev); | 369 | console.log('reserev信息', reserev); |
| 368 | console.log('seller信息', this.data.seller); | 370 | console.log('seller信息', this.data.seller); |
| 369 | console.log('detail信息', this.data.detail); | 371 | console.log('detail信息', this.data.detail); |
| @@ -1205,8 +1207,21 @@ Page({ | @@ -1205,8 +1207,21 @@ Page({ | ||
| 1205 | entry.sort((a, b) => a.id - b.id); | 1207 | entry.sort((a, b) => a.id - b.id); |
| 1206 | } | 1208 | } |
| 1207 | } | 1209 | } |
| 1210 | + let give = this.give_user; | ||
| 1211 | + let couponShow = false; | ||
| 1212 | + switch (give) { | ||
| 1213 | + case '1': | ||
| 1214 | + couponShow = this.data.options.hasSellerShare == '1' ? true : false; | ||
| 1215 | + break; | ||
| 1216 | + case '2': | ||
| 1217 | + couponShow = true; | ||
| 1218 | + break; | ||
| 1219 | + case '3': | ||
| 1220 | + couponShow = this.data.options.hasSellerShare != '1' ? true : false; | ||
| 1221 | + break; | ||
| 1222 | + } | ||
| 1208 | // 免费券判断是否领取,弹框领取 | 1223 | // 免费券判断是否领取,弹框领取 |
| 1209 | - if (freeCoupons.length > 0) { | 1224 | + if (freeCoupons.length > 0 && couponShow) { |
| 1210 | this.getCoupon(freeCoupons,obj,setcoupon) | 1225 | this.getCoupon(freeCoupons,obj,setcoupon) |
| 1211 | } | 1226 | } |
| 1212 | console.log('邀请函--------------------优惠券', list); | 1227 | console.log('邀请函--------------------优惠券', list); |
| @@ -79,6 +79,7 @@ Page({ | @@ -79,6 +79,7 @@ Page({ | ||
| 79 | n: 0, | 79 | n: 0, |
| 80 | modal:'', | 80 | modal:'', |
| 81 | couponModal: '', | 81 | couponModal: '', |
| 82 | + give_user:'', | ||
| 82 | /** | 83 | /** |
| 83 | * 生命周期函数--监听页面加载 | 84 | * 生命周期函数--监听页面加载 |
| 84 | */ | 85 | */ |
| @@ -324,9 +325,10 @@ Page({ | @@ -324,9 +325,10 @@ Page({ | ||
| 324 | dateStrDivide:dateStrDivide == '00分' ? '' : dateStrDivide, | 325 | dateStrDivide:dateStrDivide == '00分' ? '' : dateStrDivide, |
| 325 | } | 326 | } |
| 326 | }) | 327 | }) |
| 327 | - console.log('reserev reserev', reserev); | ||
| 328 | - console.log('seller seller', this.data.seller); | ||
| 329 | - console.log('detail detail', this.data.detail); | 328 | + this.give_user = reserev.give_user ? reserev.give_user : '2'; |
| 329 | + console.log('reserev信息', reserev); | ||
| 330 | + console.log('seller信息', this.data.seller); | ||
| 331 | + console.log('detail信息', this.data.detail); | ||
| 330 | setTimeout(() => { | 332 | setTimeout(() => { |
| 331 | this.getstaffinfo(res.data.uid, reserev.sid); | 333 | this.getstaffinfo(res.data.uid, reserev.sid); |
| 332 | this.getroomimage(reserev.sid) | 334 | this.getroomimage(reserev.sid) |
| @@ -1064,8 +1066,21 @@ Page({ | @@ -1064,8 +1066,21 @@ Page({ | ||
| 1064 | let freeCoupons = list.filter(item => { | 1066 | let freeCoupons = list.filter(item => { |
| 1065 | return item.is_type == '3' | 1067 | return item.is_type == '3' |
| 1066 | }) | 1068 | }) |
| 1069 | + let give = this.give_user; | ||
| 1070 | + let couponShow = false; | ||
| 1071 | + switch (give) { | ||
| 1072 | + case '1': | ||
| 1073 | + couponShow = this.data.options.hasSellerShare == '1' ? true : false; | ||
| 1074 | + break; | ||
| 1075 | + case '2': | ||
| 1076 | + couponShow = true; | ||
| 1077 | + break; | ||
| 1078 | + case '3': | ||
| 1079 | + couponShow = this.data.options.hasSellerShare != '1' ? true : false; | ||
| 1080 | + break; | ||
| 1081 | + } | ||
| 1067 | // 免费券判断是否领取,弹框领取 | 1082 | // 免费券判断是否领取,弹框领取 |
| 1068 | - if (freeCoupons.length > 0) { | 1083 | + if (freeCoupons.length > 0 && couponShow) { |
| 1069 | this.getCoupon(freeCoupons,obj,setcoupon) | 1084 | this.getCoupon(freeCoupons,obj,setcoupon) |
| 1070 | } | 1085 | } |
| 1071 | console.log('邀请函--------------------优惠券', list); | 1086 | console.log('邀请函--------------------优惠券', list); |
| @@ -79,6 +79,7 @@ Page({ | @@ -79,6 +79,7 @@ Page({ | ||
| 79 | n: 0, | 79 | n: 0, |
| 80 | modal:'', | 80 | modal:'', |
| 81 | couponModal: '', | 81 | couponModal: '', |
| 82 | + give_user:'', | ||
| 82 | /** | 83 | /** |
| 83 | * 生命周期函数--监听页面加载 | 84 | * 生命周期函数--监听页面加载 |
| 84 | */ | 85 | */ |
| @@ -324,9 +325,10 @@ Page({ | @@ -324,9 +325,10 @@ Page({ | ||
| 324 | dateStrDivide:dateStrDivide == '00分' ? '' : dateStrDivide, | 325 | dateStrDivide:dateStrDivide == '00分' ? '' : dateStrDivide, |
| 325 | } | 326 | } |
| 326 | }) | 327 | }) |
| 327 | - console.log('reserev reserev', reserev); | ||
| 328 | - console.log('seller seller', this.data.seller); | ||
| 329 | - console.log('detail detail', this.data.detail); | 328 | + this.give_user = reserev.give_user ? reserev.give_user : '2'; |
| 329 | + console.log('reserev信息', reserev); | ||
| 330 | + console.log('seller信息', this.data.seller); | ||
| 331 | + console.log('detail信息', this.data.detail); | ||
| 330 | setTimeout(() => { | 332 | setTimeout(() => { |
| 331 | this.getstaffinfo(res.data.uid, reserev.sid); | 333 | this.getstaffinfo(res.data.uid, reserev.sid); |
| 332 | this.getroomimage(reserev.sid) | 334 | this.getroomimage(reserev.sid) |
| @@ -1019,8 +1021,21 @@ Page({ | @@ -1019,8 +1021,21 @@ Page({ | ||
| 1019 | let freeCoupons = list.filter(item => { | 1021 | let freeCoupons = list.filter(item => { |
| 1020 | return item.is_type == '3' | 1022 | return item.is_type == '3' |
| 1021 | }) | 1023 | }) |
| 1024 | + let give = this.give_user; | ||
| 1025 | + let couponShow = false; | ||
| 1026 | + switch (give) { | ||
| 1027 | + case '1': | ||
| 1028 | + couponShow = this.data.options.hasSellerShare == '1' ? true : false; | ||
| 1029 | + break; | ||
| 1030 | + case '2': | ||
| 1031 | + couponShow = true; | ||
| 1032 | + break; | ||
| 1033 | + case '3': | ||
| 1034 | + couponShow = this.data.options.hasSellerShare != '1' ? true : false; | ||
| 1035 | + break; | ||
| 1036 | + } | ||
| 1022 | // 免费券判断是否领取,弹框领取 | 1037 | // 免费券判断是否领取,弹框领取 |
| 1023 | - if (freeCoupons.length > 0) { | 1038 | + if (freeCoupons.length > 0 && couponShow) { |
| 1024 | this.getCoupon(freeCoupons,obj,setcoupon) | 1039 | this.getCoupon(freeCoupons,obj,setcoupon) |
| 1025 | } | 1040 | } |
| 1026 | console.log('邀请函--------------------优惠券', list); | 1041 | console.log('邀请函--------------------优惠券', list); |
| @@ -79,6 +79,7 @@ Page({ | @@ -79,6 +79,7 @@ Page({ | ||
| 79 | n: 0, | 79 | n: 0, |
| 80 | modal:'', | 80 | modal:'', |
| 81 | couponModal: '', | 81 | couponModal: '', |
| 82 | + give_user:'', | ||
| 82 | /** | 83 | /** |
| 83 | * 生命周期函数--监听页面加载 | 84 | * 生命周期函数--监听页面加载 |
| 84 | */ | 85 | */ |
| @@ -324,9 +325,10 @@ Page({ | @@ -324,9 +325,10 @@ Page({ | ||
| 324 | dateStrDivide:dateStrDivide == '00分' ? '' : dateStrDivide, | 325 | dateStrDivide:dateStrDivide == '00分' ? '' : dateStrDivide, |
| 325 | } | 326 | } |
| 326 | }) | 327 | }) |
| 327 | - console.log('reserev reserev', reserev); | ||
| 328 | - console.log('seller seller', this.data.seller); | ||
| 329 | - console.log('detail detail', this.data.detail); | 328 | + this.give_user = reserev.give_user ? reserev.give_user : '2'; |
| 329 | + console.log('reserev信息', reserev); | ||
| 330 | + console.log('seller信息', this.data.seller); | ||
| 331 | + console.log('detail信息', this.data.detail); | ||
| 330 | setTimeout(() => { | 332 | setTimeout(() => { |
| 331 | this.getstaffinfo(res.data.uid, reserev.sid); | 333 | this.getstaffinfo(res.data.uid, reserev.sid); |
| 332 | this.getroomimage(reserev.sid) | 334 | this.getroomimage(reserev.sid) |
| @@ -1019,8 +1021,21 @@ Page({ | @@ -1019,8 +1021,21 @@ Page({ | ||
| 1019 | let freeCoupons = list.filter(item => { | 1021 | let freeCoupons = list.filter(item => { |
| 1020 | return item.is_type == '3' | 1022 | return item.is_type == '3' |
| 1021 | }) | 1023 | }) |
| 1024 | + let give = this.give_user; | ||
| 1025 | + let couponShow = false; | ||
| 1026 | + switch (give) { | ||
| 1027 | + case '1': | ||
| 1028 | + couponShow = this.data.options.hasSellerShare == '1' ? true : false; | ||
| 1029 | + break; | ||
| 1030 | + case '2': | ||
| 1031 | + couponShow = true; | ||
| 1032 | + break; | ||
| 1033 | + case '3': | ||
| 1034 | + couponShow = this.data.options.hasSellerShare != '1' ? true : false; | ||
| 1035 | + break; | ||
| 1036 | + } | ||
| 1022 | // 免费券判断是否领取,弹框领取 | 1037 | // 免费券判断是否领取,弹框领取 |
| 1023 | - if (freeCoupons.length > 0) { | 1038 | + if (freeCoupons.length > 0 && couponShow) { |
| 1024 | this.getCoupon(freeCoupons,obj,setcoupon) | 1039 | this.getCoupon(freeCoupons,obj,setcoupon) |
| 1025 | } | 1040 | } |
| 1026 | console.log('邀请函--------------------优惠券', list); | 1041 | console.log('邀请函--------------------优惠券', list); |
| @@ -78,6 +78,7 @@ Page({ | @@ -78,6 +78,7 @@ Page({ | ||
| 78 | n: 0, | 78 | n: 0, |
| 79 | modal:'', | 79 | modal:'', |
| 80 | couponModal: '', | 80 | couponModal: '', |
| 81 | + give_user:'', | ||
| 81 | /** | 82 | /** |
| 82 | * 生命周期函数--监听页面加载 | 83 | * 生命周期函数--监听页面加载 |
| 83 | */ | 84 | */ |
| @@ -323,9 +324,10 @@ Page({ | @@ -323,9 +324,10 @@ Page({ | ||
| 323 | dateStrDivide:dateStrDivide == '00分' ? '' : dateStrDivide, | 324 | dateStrDivide:dateStrDivide == '00分' ? '' : dateStrDivide, |
| 324 | } | 325 | } |
| 325 | }) | 326 | }) |
| 326 | - console.log('reserev reserev', reserev); | ||
| 327 | - console.log('seller seller', this.data.seller); | ||
| 328 | - console.log('detail detail', this.data.detail); | 327 | + this.give_user = reserev.give_user ? reserev.give_user : '2'; |
| 328 | + console.log('reserev信息', reserev); | ||
| 329 | + console.log('seller信息', this.data.seller); | ||
| 330 | + console.log('detail信息', this.data.detail); | ||
| 329 | setTimeout(() => { | 331 | setTimeout(() => { |
| 330 | this.getstaffinfo(res.data.uid, reserev.sid); | 332 | this.getstaffinfo(res.data.uid, reserev.sid); |
| 331 | this.getroomimage(reserev.sid) | 333 | this.getroomimage(reserev.sid) |
| @@ -1018,8 +1020,21 @@ Page({ | @@ -1018,8 +1020,21 @@ Page({ | ||
| 1018 | let freeCoupons = list.filter(item => { | 1020 | let freeCoupons = list.filter(item => { |
| 1019 | return item.is_type == '3' | 1021 | return item.is_type == '3' |
| 1020 | }) | 1022 | }) |
| 1023 | + let give = this.give_user; | ||
| 1024 | + let couponShow = false; | ||
| 1025 | + switch (give) { | ||
| 1026 | + case '1': | ||
| 1027 | + couponShow = this.data.options.hasSellerShare == '1' ? true : false; | ||
| 1028 | + break; | ||
| 1029 | + case '2': | ||
| 1030 | + couponShow = true; | ||
| 1031 | + break; | ||
| 1032 | + case '3': | ||
| 1033 | + couponShow = this.data.options.hasSellerShare != '1' ? true : false; | ||
| 1034 | + break; | ||
| 1035 | + } | ||
| 1021 | // 免费券判断是否领取,弹框领取 | 1036 | // 免费券判断是否领取,弹框领取 |
| 1022 | - if (freeCoupons.length > 0) { | 1037 | + if (freeCoupons.length > 0 && couponShow) { |
| 1023 | this.getCoupon(freeCoupons,obj,setcoupon) | 1038 | this.getCoupon(freeCoupons,obj,setcoupon) |
| 1024 | } | 1039 | } |
| 1025 | console.log('邀请函--------------------优惠券', list); | 1040 | console.log('邀请函--------------------优惠券', list); |
| @@ -78,6 +78,7 @@ Page({ | @@ -78,6 +78,7 @@ Page({ | ||
| 78 | n: 0, | 78 | n: 0, |
| 79 | modal:'', | 79 | modal:'', |
| 80 | couponModal: '', | 80 | couponModal: '', |
| 81 | + give_user:'', | ||
| 81 | /** | 82 | /** |
| 82 | * 生命周期函数--监听页面加载 | 83 | * 生命周期函数--监听页面加载 |
| 83 | */ | 84 | */ |
| @@ -279,9 +280,10 @@ Page({ | @@ -279,9 +280,10 @@ Page({ | ||
| 279 | dateStrDivide:dateStrDivide == '00分' ? '' : dateStrDivide, | 280 | dateStrDivide:dateStrDivide == '00分' ? '' : dateStrDivide, |
| 280 | } | 281 | } |
| 281 | }) | 282 | }) |
| 282 | - console.log('reserev reserev', reserev); | ||
| 283 | - console.log('seller seller', this.data.seller); | ||
| 284 | - console.log('detail detail', this.data.detail); | 283 | + this.give_user = reserev.give_user ? reserev.give_user : '2'; |
| 284 | + console.log('reserev信息', reserev); | ||
| 285 | + console.log('seller信息', this.data.seller); | ||
| 286 | + console.log('detail信息', this.data.detail); | ||
| 285 | setTimeout(() => { | 287 | setTimeout(() => { |
| 286 | this.getstaffinfo(res.data.uid, reserev.sid); | 288 | this.getstaffinfo(res.data.uid, reserev.sid); |
| 287 | this.getSellerVersionFun(reserev.sid); | 289 | this.getSellerVersionFun(reserev.sid); |
| @@ -976,8 +978,21 @@ Page({ | @@ -976,8 +978,21 @@ Page({ | ||
| 976 | let freeCoupons = list.filter(item => { | 978 | let freeCoupons = list.filter(item => { |
| 977 | return item.is_type == '3' | 979 | return item.is_type == '3' |
| 978 | }) | 980 | }) |
| 981 | + let give = this.give_user; | ||
| 982 | + let couponShow = false; | ||
| 983 | + switch (give) { | ||
| 984 | + case '1': | ||
| 985 | + couponShow = this.data.options.hasSellerShare == '1' ? true : false; | ||
| 986 | + break; | ||
| 987 | + case '2': | ||
| 988 | + couponShow = true; | ||
| 989 | + break; | ||
| 990 | + case '3': | ||
| 991 | + couponShow = this.data.options.hasSellerShare != '1' ? true : false; | ||
| 992 | + break; | ||
| 993 | + } | ||
| 979 | // 免费券判断是否领取,弹框领取 | 994 | // 免费券判断是否领取,弹框领取 |
| 980 | - if (freeCoupons.length > 0) { | 995 | + if (freeCoupons.length > 0 && couponShow) { |
| 981 | this.getCoupon(freeCoupons,obj,setcoupon) | 996 | this.getCoupon(freeCoupons,obj,setcoupon) |
| 982 | } | 997 | } |
| 983 | console.log('邀请函--------------------优惠券', list); | 998 | console.log('邀请函--------------------优惠券', list); |
| @@ -79,6 +79,7 @@ Page({ | @@ -79,6 +79,7 @@ Page({ | ||
| 79 | n: 0, | 79 | n: 0, |
| 80 | modal:'', | 80 | modal:'', |
| 81 | couponModal: '', | 81 | couponModal: '', |
| 82 | + give_user:'', | ||
| 82 | /** | 83 | /** |
| 83 | * 生命周期函数--监听页面加载 | 84 | * 生命周期函数--监听页面加载 |
| 84 | */ | 85 | */ |
| @@ -324,9 +325,10 @@ Page({ | @@ -324,9 +325,10 @@ Page({ | ||
| 324 | dateStrDivide:dateStrDivide == '00分' ? '' : dateStrDivide, | 325 | dateStrDivide:dateStrDivide == '00分' ? '' : dateStrDivide, |
| 325 | } | 326 | } |
| 326 | }) | 327 | }) |
| 327 | - console.log('reserev reserev', reserev); | ||
| 328 | - console.log('seller seller', this.data.seller); | ||
| 329 | - console.log('detail detail', this.data.detail); | 328 | + this.give_user = reserev.give_user ? reserev.give_user : '2'; |
| 329 | + console.log('reserev信息', reserev); | ||
| 330 | + console.log('seller信息', this.data.seller); | ||
| 331 | + console.log('detail信息', this.data.detail); | ||
| 330 | setTimeout(() => { | 332 | setTimeout(() => { |
| 331 | this.getstaffinfo(res.data.uid, reserev.sid); | 333 | this.getstaffinfo(res.data.uid, reserev.sid); |
| 332 | this.getroomimage(reserev.sid) | 334 | this.getroomimage(reserev.sid) |
| @@ -1019,8 +1021,21 @@ Page({ | @@ -1019,8 +1021,21 @@ Page({ | ||
| 1019 | let freeCoupons = list.filter(item => { | 1021 | let freeCoupons = list.filter(item => { |
| 1020 | return item.is_type == '3' | 1022 | return item.is_type == '3' |
| 1021 | }) | 1023 | }) |
| 1024 | + let give = this.give_user; | ||
| 1025 | + let couponShow = false; | ||
| 1026 | + switch (give) { | ||
| 1027 | + case '1': | ||
| 1028 | + couponShow = this.data.options.hasSellerShare == '1' ? true : false; | ||
| 1029 | + break; | ||
| 1030 | + case '2': | ||
| 1031 | + couponShow = true; | ||
| 1032 | + break; | ||
| 1033 | + case '3': | ||
| 1034 | + couponShow = this.data.options.hasSellerShare != '1' ? true : false; | ||
| 1035 | + break; | ||
| 1036 | + } | ||
| 1022 | // 免费券判断是否领取,弹框领取 | 1037 | // 免费券判断是否领取,弹框领取 |
| 1023 | - if (freeCoupons.length > 0) { | 1038 | + if (freeCoupons.length > 0 && couponShow) { |
| 1024 | this.getCoupon(freeCoupons,obj,setcoupon) | 1039 | this.getCoupon(freeCoupons,obj,setcoupon) |
| 1025 | } | 1040 | } |
| 1026 | console.log('邀请函--------------------优惠券', list); | 1041 | console.log('邀请函--------------------优惠券', list); |
| @@ -79,6 +79,7 @@ Page({ | @@ -79,6 +79,7 @@ Page({ | ||
| 79 | n: 0, | 79 | n: 0, |
| 80 | modal:'', | 80 | modal:'', |
| 81 | couponModal: '', | 81 | couponModal: '', |
| 82 | + give_user:'', | ||
| 82 | /** | 83 | /** |
| 83 | * 生命周期函数--监听页面加载 | 84 | * 生命周期函数--监听页面加载 |
| 84 | */ | 85 | */ |
| @@ -323,9 +324,10 @@ Page({ | @@ -323,9 +324,10 @@ Page({ | ||
| 323 | dateStrDivide:dateStrDivide == '00分' ? '' : dateStrDivide, | 324 | dateStrDivide:dateStrDivide == '00分' ? '' : dateStrDivide, |
| 324 | } | 325 | } |
| 325 | }) | 326 | }) |
| 326 | - console.log('reserev reserev', reserev); | ||
| 327 | - console.log('seller seller', this.data.seller); | ||
| 328 | - console.log('detail detail', this.data.detail); | 327 | + this.give_user = reserev.give_user ? reserev.give_user : '2'; |
| 328 | + console.log('reserev信息', reserev); | ||
| 329 | + console.log('seller信息', this.data.seller); | ||
| 330 | + console.log('detail信息', this.data.detail); | ||
| 329 | setTimeout(() => { | 331 | setTimeout(() => { |
| 330 | this.getstaffinfo(res.data.uid, reserev.sid); | 332 | this.getstaffinfo(res.data.uid, reserev.sid); |
| 331 | this.getroomimage(reserev.sid) | 333 | this.getroomimage(reserev.sid) |
| @@ -1018,8 +1020,21 @@ Page({ | @@ -1018,8 +1020,21 @@ Page({ | ||
| 1018 | let freeCoupons = list.filter(item => { | 1020 | let freeCoupons = list.filter(item => { |
| 1019 | return item.is_type == '3' | 1021 | return item.is_type == '3' |
| 1020 | }) | 1022 | }) |
| 1023 | + let give = this.give_user; | ||
| 1024 | + let couponShow = false; | ||
| 1025 | + switch (give) { | ||
| 1026 | + case '1': | ||
| 1027 | + couponShow = this.data.options.hasSellerShare == '1' ? true : false; | ||
| 1028 | + break; | ||
| 1029 | + case '2': | ||
| 1030 | + couponShow = true; | ||
| 1031 | + break; | ||
| 1032 | + case '3': | ||
| 1033 | + couponShow = this.data.options.hasSellerShare != '1' ? true : false; | ||
| 1034 | + break; | ||
| 1035 | + } | ||
| 1021 | // 免费券判断是否领取,弹框领取 | 1036 | // 免费券判断是否领取,弹框领取 |
| 1022 | - if (freeCoupons.length > 0) { | 1037 | + if (freeCoupons.length > 0 && couponShow) { |
| 1023 | this.getCoupon(freeCoupons,obj,setcoupon) | 1038 | this.getCoupon(freeCoupons,obj,setcoupon) |
| 1024 | } | 1039 | } |
| 1025 | console.log('邀请函--------------------优惠券', list); | 1040 | console.log('邀请函--------------------优惠券', list); |
| @@ -87,6 +87,7 @@ Page({ | @@ -87,6 +87,7 @@ Page({ | ||
| 87 | n: 0, | 87 | n: 0, |
| 88 | modal:'', | 88 | modal:'', |
| 89 | couponModal: '', | 89 | couponModal: '', |
| 90 | + give_user:'', | ||
| 90 | /** | 91 | /** |
| 91 | * 生命周期函数--监听页面加载 | 92 | * 生命周期函数--监听页面加载 |
| 92 | */ | 93 | */ |
| @@ -341,9 +342,10 @@ Page({ | @@ -341,9 +342,10 @@ Page({ | ||
| 341 | phone:reserev.phone, | 342 | phone:reserev.phone, |
| 342 | } | 343 | } |
| 343 | }) | 344 | }) |
| 344 | - console.log('reserev reserev', reserev); | ||
| 345 | - console.log('seller seller', this.data.seller); | ||
| 346 | - console.log('detail detail', this.data.detail); | 345 | + this.give_user = reserev.give_user ? reserev.give_user : '2'; |
| 346 | + console.log('reserev信息', reserev); | ||
| 347 | + console.log('seller信息', this.data.seller); | ||
| 348 | + console.log('detail信息', this.data.detail); | ||
| 347 | setTimeout(() => { | 349 | setTimeout(() => { |
| 348 | this.getstaffinfo(res.data.uid, reserev.sid); | 350 | this.getstaffinfo(res.data.uid, reserev.sid); |
| 349 | this.getroomimage(reserev.sid) | 351 | this.getroomimage(reserev.sid) |
| @@ -1059,8 +1061,21 @@ Page({ | @@ -1059,8 +1061,21 @@ Page({ | ||
| 1059 | let freeCoupons = list.filter(item => { | 1061 | let freeCoupons = list.filter(item => { |
| 1060 | return item.is_type == '3' | 1062 | return item.is_type == '3' |
| 1061 | }) | 1063 | }) |
| 1064 | + let give = this.give_user; | ||
| 1065 | + let couponShow = false; | ||
| 1066 | + switch (give) { | ||
| 1067 | + case '1': | ||
| 1068 | + couponShow = this.data.options.hasSellerShare == '1' ? true : false; | ||
| 1069 | + break; | ||
| 1070 | + case '2': | ||
| 1071 | + couponShow = true; | ||
| 1072 | + break; | ||
| 1073 | + case '3': | ||
| 1074 | + couponShow = this.data.options.hasSellerShare != '1' ? true : false; | ||
| 1075 | + break; | ||
| 1076 | + } | ||
| 1062 | // 免费券判断是否领取,弹框领取 | 1077 | // 免费券判断是否领取,弹框领取 |
| 1063 | - if (freeCoupons.length > 0) { | 1078 | + if (freeCoupons.length > 0 && couponShow) { |
| 1064 | this.getCoupon(freeCoupons,obj,setcoupon) | 1079 | this.getCoupon(freeCoupons,obj,setcoupon) |
| 1065 | } | 1080 | } |
| 1066 | console.log('邀请函--------------------优惠券', list); | 1081 | console.log('邀请函--------------------优惠券', list); |
-
Please register or login to post a comment