Commit 7e042c2939996c38bf4a1f2c50e4a28c956665e5

Authored by yvan.ni
1 parent 28d038b3

1、用户同意协议的优化

2、强制邀请码的优化
packageG/pages/plus_agreement/plus_agreement.js 0 → 100644
  1 +const w = require("../../../utils/wxParse/wxParse.js");
  2 +var os=getApp().globalData.setting;
  3 +var ut = require("../../../utils/util.js");
  4 +Page({
  5 + data:{
  6 + },
  7 +
  8 + //调用视频接口
  9 + onLoad:function(e){
  10 + var that = this;
  11 + //-----------商家配置信息----- 等级卡规则,是否又开邀请码,营业员------------
  12 + getApp().request.get("/api/weshop/storeconfig/get/" + os.stoid, {
  13 + success: function (res) {
  14 + var is_cardrule = res.data.data.cardrules;
  15 + w.wxParse("content", "html", ut.format_content(is_cardrule), that, 6);
  16 + }
  17 + })
  18 + },
  19 +
  20 +
  21 +})
0 \ No newline at end of file 22 \ No newline at end of file
packageG/pages/plus_agreement/plus_agreement.json 0 → 100644
  1 +{
  2 + "navigationBarTitleText": "PLUS会员用户协议",
  3 + "enablePullDownRefresh": false
  4 +}
0 \ No newline at end of file 5 \ No newline at end of file
packageG/pages/plus_agreement/plus_agreement.wxml 0 → 100644
  1 +<import src="../../../utils/wxParse/wxParse.wxml"></import>
  2 +<view class="wxParse" style="padding:0 20rpx">
  3 + <template is="wxParse" data="{{wxParseData:content.nodes}}"></template>
  4 +</view>
0 \ No newline at end of file 5 \ No newline at end of file
packageG/pages/plus_agreement/plus_agreement.wxss 0 → 100644
  1 +@import "../../../utils/wxParse/wxParse.wxss";
0 \ No newline at end of file 2 \ No newline at end of file
pages/user/plus/plus.js
@@ -45,7 +45,8 @@ Page({ @@ -45,7 +45,8 @@ Page({
45 is_select: false, //是否选择营业员过 45 is_select: false, //是否选择营业员过
46 is_buy_card_id:"",//是否是链接直接过来购买的卡号id 46 is_buy_card_id:"",//是否是链接直接过来购买的卡号id
47 47
48 - is_fir_open:0 //防止多次打开 48 + is_fir_open:0, //防止多次打开
  49 + check_py_val:0
49 50
50 }, 51 },
51 swiperChange: function (e) { 52 swiperChange: function (e) {
@@ -441,6 +442,11 @@ Page({ @@ -441,6 +442,11 @@ Page({
441 return false; 442 return false;
442 } 443 }
443 444
  445 + if(!this.data.check_py_val){
  446 + ut.m_toast('请先同意PLUS会员用户协议')
  447 + return false;
  448 + }
  449 +
444 var item = th.data.is_plusCard[th.data.by_index]; 450 var item = th.data.is_plusCard[th.data.by_index];
445 var req = {}; 451 var req = {};
446 req.cardId = item.CardId; 452 req.cardId = item.CardId;
@@ -462,7 +468,7 @@ Page({ @@ -462,7 +468,7 @@ Page({
462 getApp().my_warnning("邀请人不能填自已", 0, th); 468 getApp().my_warnning("邀请人不能填自已", 0, th);
463 return false; 469 return false;
464 } 470 }
465 - req.recommon = th.data.inp_recommon 471 + if(th.data.inp_recommon) req.recommon = th.data.inp_recommon
466 } 472 }
467 //--后台要求要输入营业员-- 473 //--后台要求要输入营业员--
468 if (th.data.is_salesman) { 474 if (th.data.is_salesman) {
@@ -473,11 +479,15 @@ Page({ @@ -473,11 +479,15 @@ Page({
473 }) 479 })
474 return false; 480 return false;
475 } 481 }
476 - req.serviceman = th.data.inp_serviceman 482 + if(th.data.inp_serviceman) req.serviceman = th.data.inp_serviceman
477 } 483 }
478 } 484 }
479 req.storeId = os.stoid; 485 req.storeId = os.stoid;
480 req.userId = getApp().globalData.user_id; 486 req.userId = getApp().globalData.user_id;
  487 +
  488 +
  489 +
  490 +
481 //--如果有邀请码,和营业员的情况下-- 491 //--如果有邀请码,和营业员的情况下--
482 if (req.recommon || req.serviceman) { 492 if (req.recommon || req.serviceman) {
483 493
@@ -707,5 +717,21 @@ Page({ @@ -707,5 +717,21 @@ Page({
707 }) 717 })
708 } 718 }
709 } 719 }
  720 + },
  721 +
  722 + //用户协议的同意的优化
  723 + handleCheckboxChange:function (){
  724 + console.log('this.data.checkboxValue ==> ' , this.data.checkboxValue);
  725 + this.setData({
  726 + // 点击之后进行取反
  727 + check_py_val : !this.data.check_py_val
  728 + })
  729 + },
  730 +
  731 + //显示协议的内容
  732 + show_more_xy:function (){
  733 + getApp().goto("/packageG/pages/plus_agreement/plus_agreement");
710 } 734 }
  735 +
  736 +
711 }) 737 })
712 \ No newline at end of file 738 \ No newline at end of file
pages/user/plus/plus.wxml
@@ -153,6 +153,12 @@ @@ -153,6 +153,12 @@
153 确认购买 153 确认购买
154 </view> 154 </view>
155 </view> 155 </view>
  156 +
  157 + <view style="padding-bottom:20rpx">
  158 + <checkbox id="check_py" class="m_checkbox" checked="{{check_py_val}}" bindtap="handleCheckboxChange" />
  159 + <label for="check_py" style="color:#333;font-size:23rpx">请详细阅读并同意 <text catchtap="show_more_xy" style="color:#ff9278">《PLUS会员用户协议》</text> </label>
  160 + </view>
  161 +
156 </view> 162 </view>
157 </view> 163 </view>
158 164
pages/user/plus/plus.wxss
@@ -384,7 +384,8 @@ swiper { @@ -384,7 +384,8 @@ swiper {
384 height: 50rpx; 384 height: 50rpx;
385 border-radius: 25rpx; 385 border-radius: 25rpx;
386 color: rgb(255, 255, 255); 386 color: rgb(255, 255, 255);
387 - margin: 55rpx 0rpx; 387 + margin-top: 55rpx;
  388 + margin-bottom: 15rpx;
388 background-position: center;background-repeat: no-repeat;background-size: cover 389 background-position: center;background-repeat: no-repeat;background-size: cover
389 } 390 }
390 391
@@ -423,4 +424,10 @@ swiper-item{ @@ -423,4 +424,10 @@ swiper-item{
423 left: -20%; 424 left: -20%;
424 top: -2rpx; 425 top: -2rpx;
425 border-radius: 0 0 50% 50%; /* 只要顶部两个角是圆弧就好了 */ 426 border-radius: 0 0 50% 50%; /* 只要顶部两个角是圆弧就好了 */
  427 +}
  428 +
  429 +.m_checkbox .wx-checkbox-input {
  430 + border-radius: 50%;
  431 + width: 23rpx !important;
  432 + height: 23rpx !important;
426 } 433 }
427 \ No newline at end of file 434 \ No newline at end of file