Commit 28d038b32dbd471e375f89ae3346c00f4102e407
1 parent
5293c6ec
等级卡的优化
Showing
1 changed file
with
7 additions
and
4 deletions
pages/user/plus/plus.js
| ... | ... | @@ -30,8 +30,10 @@ Page({ |
| 30 | 30 | open_yq: 0, //显示打开邀请码的弹窗 |
| 31 | 31 | by_index: null, //购买卡的下班 |
| 32 | 32 | |
| 33 | - isyaoqingma: 0, //是否邀请码 | |
| 34 | - is_salesman: 0, //是否营业员 | |
| 33 | + isyaoqingma: 0, //是否显示邀请码 | |
| 34 | + is_salesman: 0, //是否显示营业员 | |
| 35 | + is_must_staff_yqma: 0, //是否必填 | |
| 36 | + | |
| 35 | 37 | inp_recommon: null, //输入的邀请码 |
| 36 | 38 | inp_serviceman: null, //输入的营业员 |
| 37 | 39 | is_fengxiang: 0, //是不是分享过来的 |
| ... | ... | @@ -112,6 +114,7 @@ Page({ |
| 112 | 114 | is_card_rule: is_cardrule, |
| 113 | 115 | isyaoqingma: parseInt(swi_arr.isyaoqingma), |
| 114 | 116 | is_salesman: parseInt(swi_arr.is_staffno), |
| 117 | + is_must_staff_yqma: parseInt(swi_arr.is_must_staff_yqma), | |
| 115 | 118 | plus_bg_color: swi_arr.plus_bg_color, |
| 116 | 119 | }); |
| 117 | 120 | } |
| ... | ... | @@ -449,7 +452,7 @@ Page({ |
| 449 | 452 | } else { |
| 450 | 453 | //---后台要求要输入邀请码--- |
| 451 | 454 | if (th.data.isyaoqingma) { |
| 452 | - if (!th.data.inp_recommon) { | |
| 455 | + if (!th.data.inp_recommon && th.data.is_must_staff_yqma) { | |
| 453 | 456 | getApp().my_warnning("请输入邀请码", 0, th); |
| 454 | 457 | return false; |
| 455 | 458 | } |
| ... | ... | @@ -463,7 +466,7 @@ Page({ |
| 463 | 466 | } |
| 464 | 467 | //--后台要求要输入营业员-- |
| 465 | 468 | if (th.data.is_salesman) { |
| 466 | - if (!th.data.inp_serviceman) { | |
| 469 | + if (!th.data.inp_serviceman && th.data.is_must_staff_yqma) { | |
| 467 | 470 | getApp().my_warnning("请输入营业员", 0, th); |
| 468 | 471 | th.setData({ |
| 469 | 472 | focus:true | ... | ... |