Commit 28d038b32dbd471e375f89ae3346c00f4102e407

Authored by yvan.ni
1 parent 5293c6ec

等级卡的优化

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