Commit 9ef993a6d93b7936f72b4efa8f483b16da788799
Merge branch 'dev_oa_fu24' into dev
Showing
15 changed files
with
186 additions
and
12 deletions
app.json
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 | 22 | \ No newline at end of file | ... | ... |
packageG/pages/plus_agreement/plus_agreement.json
0 → 100644
packageG/pages/plus_agreement/plus_agreement.wxml
0 → 100644
packageG/pages/plus_agreement/plus_agreement.wxss
0 → 100644
pages/giftpack/mygiftpack/mygiftpack.js
1 | 1 | var i = require("../../../utils/util.js") |
2 | +const ut = require("../../../utils/util.js"); | |
2 | 3 | var e = getApp(), |
3 | 4 | a = e.globalData.setting, |
4 | 5 | os = a, |
... | ... | @@ -108,6 +109,34 @@ Page({ |
108 | 109 | th.data.curpage++; |
109 | 110 | var arr1 = th.data.wareCard; |
110 | 111 | var arr2 = res.data.data.pageData; |
112 | + | |
113 | + for (let j = 0; j <arr2.length ; j++) { | |
114 | + | |
115 | + var t_now = ut.gettimestamp(); | |
116 | + | |
117 | + //---获取日期的时间戳--- | |
118 | + var t_endtime = arr2[j].endTime; | |
119 | + t_endtime = t_endtime.replace(/-/g, '/'); | |
120 | + var t_date = new Date(t_endtime) / 1000; | |
121 | + | |
122 | + | |
123 | + var t_starttime = arr2[j].starTime; | |
124 | + t_starttime = t_starttime.replace(/-/g, '/'); | |
125 | + var t_sdate = new Date(t_starttime) / 1000; | |
126 | + | |
127 | + if (!arr2[j].iswarelbtype) | |
128 | + arr2[j].c_state=-2 //无核销商品 | |
129 | + else if (arr2[j].goodsUseState) | |
130 | + arr2[j].c_state=1 //已核销 | |
131 | + else if (t_date <= t_now) | |
132 | + arr2[j].c_state=2 //已过期 | |
133 | + else if (t_sdate > t_now) | |
134 | + arr2[j].c_state=-1 //未开始 | |
135 | + else | |
136 | + arr2[j].c_state=0 //正常 | |
137 | + } | |
138 | + | |
139 | + | |
111 | 140 | var arr3 = [...arr1, ...arr2]; |
112 | 141 | var ismore = 0; |
113 | 142 | if (arr3.length == res.data.data.total) ismore = 1 | ... | ... |
pages/giftpack/mygiftpack/mygiftpack.wxml
... | ... | @@ -94,7 +94,11 @@ |
94 | 94 | </view> |
95 | 95 | </view> |
96 | 96 | <view wx:if="{{item.is_back !=1}}" class="content_box_button" bindtap="navigateTo" data-url="/pages/giftpack/giftpacklist/giftpacklist?isBuy=0&lbId={{item.lbId}}&cover_img={{item.cover_img}}&orderSn={{item.orderSn}}"> |
97 | - <button>立即使用</button> | |
97 | + <button class="overdue" wx:if="{{item.c_state==-2}}">无核销商品</button> | |
98 | + <button class="overdue" wx:if="{{item.c_state==-1}}">兑换未开始</button> | |
99 | + <button wx:if="{{item.c_state==0}}">立即使用</button> | |
100 | + <button class="overdue" wx:if="{{item.c_state==1}}" >商品已核销</button> | |
101 | + <button class="overdue" wx:if="{{item.c_state==2}}">商品兑换时间已过</button> | |
98 | 102 | </view> |
99 | 103 | <view class="content_box_button" style="color:#b9b5b5;" wx:else>已退款</view> |
100 | 104 | </view> | ... | ... |
pages/giftpack/mygiftpack/mygiftpack.wxss
pages/goods/goodsInfo/goodsInfo.js
... | ... | @@ -4697,6 +4697,12 @@ Page({ |
4697 | 4697 | gg = "规格" + gb; |
4698 | 4698 | gb++; |
4699 | 4699 | } |
4700 | + | |
4701 | + if (item.spec_img) | |
4702 | + item.original_img = os.imghost + item.spec_img; | |
4703 | + else | |
4704 | + item.original_img = os.imghost + item.original_img; | |
4705 | + | |
4700 | 4706 | item.gg = gg; |
4701 | 4707 | item.prom_id = item.prom_id; |
4702 | 4708 | item.prom_type = 1; | ... | ... |
pages/user/index/index.js
... | ... | @@ -199,6 +199,9 @@ Page({ |
199 | 199 | |
200 | 200 | if (e != undefined && e != null && e.mobile) { |
201 | 201 | |
202 | + this.puls_user(); | |
203 | + | |
204 | + | |
202 | 205 | |
203 | 206 | if(this.data.has_rj==0){ |
204 | 207 | var portrait_req = { |
... | ... | @@ -1137,6 +1140,27 @@ Page({ |
1137 | 1140 | }); |
1138 | 1141 | }, |
1139 | 1142 | |
1143 | + //-----Plus会员获取----------- | |
1144 | + puls_user: function() { | |
1145 | + var th = this; | |
1146 | + getApp().request.get("/api/weshop/plus/vip/mem/list", { | |
1147 | + data: { | |
1148 | + storeId: os.stoid, | |
1149 | + userId: getApp().globalData.user_id, | |
1150 | + }, | |
1151 | + success: function(su) { | |
1152 | + | |
1153 | + if (su.data.code == 0) { | |
1154 | + var cardname = su.data.data[0].MemCardName; | |
1155 | + if(cardname.length>5) cardname=cardname.substring(0,5); //保留5个字 | |
1156 | + th.setData({ | |
1157 | + pulscardname: cardname | |
1158 | + }); | |
1159 | + } | |
1160 | + } | |
1161 | + }); | |
1162 | + }, | |
1163 | + | |
1140 | 1164 | |
1141 | 1165 | |
1142 | 1166 | ... | ... |
pages/user/index/index.wxml
... | ... | @@ -9,7 +9,16 @@ |
9 | 9 | <image class="xc-background" src="{{iurl}}{{ad_img?ad_img:'/miniapp/images/user_index_powder.jpg'}}"> |
10 | 10 | <view class="flex-space-between abs xc-user-frame"> |
11 | 11 | <view class="xc-user-left flex" wx:if="{{userInfo}}"> |
12 | - <image class="xc-user-img circle" bindtap="go_info" src="{{userInfo.head_pic?userInfo.head_pic:defaultAvatar}}"></image> | |
12 | + <view style="position:relative;"> | |
13 | + <image class="xc-user-img circle" bindtap="go_info" src="{{userInfo.head_pic?userInfo.head_pic:defaultAvatar}}"></image> | |
14 | + <block wx:if="{{pulscardname && sys_switch.rank_switch > 0 }}"> | |
15 | + <view data-url="/pages/user/plus/plus" catchtap="goto" class="flex-center plusMax"> | |
16 | + <image class="fuls" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image> | |
17 | + <view>{{pulscardname}}</view> | |
18 | + </view> | |
19 | + </block> | |
20 | + </view> | |
21 | + | |
13 | 22 | <view class="xc-uesr-name"> |
14 | 23 | <view class="flex ai-center"> |
15 | 24 | <text class="ellipsis-1" style="max-width: 290rpx;display: inline-block">{{userInfo.nickname}}</text> |
... | ... | @@ -18,6 +27,9 @@ |
18 | 27 | </view> |
19 | 28 | </view> |
20 | 29 | |
30 | + | |
31 | + | |
32 | + | |
21 | 33 | <view class="flex fs24 xc-grow-ups" style="margin-left:8rpx;margin-top:6rpx" wx:if="{{is_init && gradeId}}" bindtap='jump'> |
22 | 34 | <block wx:if="{{cz_val<full_cz_val}}"> |
23 | 35 | {{" "}} | ... | ... |
pages/user/index/index.wxss
... | ... | @@ -752,8 +752,30 @@ button::after { |
752 | 752 | } |
753 | 753 | |
754 | 754 | |
755 | - | |
756 | 755 | .action .icon-guan { |
757 | 756 | left: auto !important; |
758 | 757 | right: 20rpx !important; |
758 | +} | |
759 | + | |
760 | +.plusMax { | |
761 | + background: linear-gradient(to bottom, #4c3217, #010100); | |
762 | + height: 40rpx; | |
763 | + border-radius: 20rpx; | |
764 | + line-height: 40rpx; | |
765 | + padding-left: 15rpx; | |
766 | + padding-right: 15rpx; | |
767 | + font-size: 20rpx; | |
768 | + position: absolute; | |
769 | + left: 50%; | |
770 | + bottom: -20rpx; | |
771 | + white-space: nowrap; | |
772 | + transform: translate(-50%, 0); | |
773 | + color: #fff; | |
774 | + | |
775 | +} | |
776 | + | |
777 | +.fuls { | |
778 | + width: 25rpx; | |
779 | + height: 25rpx; | |
780 | + margin-right: 5rpx; | |
759 | 781 | } |
760 | 782 | \ No newline at end of file | ... | ... |
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, //是不是分享过来的 |
... | ... | @@ -43,7 +45,8 @@ Page({ |
43 | 45 | is_select: false, //是否选择营业员过 |
44 | 46 | is_buy_card_id:"",//是否是链接直接过来购买的卡号id |
45 | 47 | |
46 | - is_fir_open:0 //防止多次打开 | |
48 | + is_fir_open:0, //防止多次打开 | |
49 | + check_py_val:0 | |
47 | 50 | |
48 | 51 | }, |
49 | 52 | swiperChange: function (e) { |
... | ... | @@ -112,6 +115,7 @@ Page({ |
112 | 115 | is_card_rule: is_cardrule, |
113 | 116 | isyaoqingma: parseInt(swi_arr.isyaoqingma), |
114 | 117 | is_salesman: parseInt(swi_arr.is_staffno), |
118 | + is_must_staff_yqma: parseInt(swi_arr.is_must_staff_yqma), | |
115 | 119 | plus_bg_color: swi_arr.plus_bg_color, |
116 | 120 | }); |
117 | 121 | } |
... | ... | @@ -438,6 +442,11 @@ Page({ |
438 | 442 | return false; |
439 | 443 | } |
440 | 444 | |
445 | + if(!this.data.check_py_val){ | |
446 | + ut.m_toast('请先同意PLUS会员用户协议') | |
447 | + return false; | |
448 | + } | |
449 | + | |
441 | 450 | var item = th.data.is_plusCard[th.data.by_index]; |
442 | 451 | var req = {}; |
443 | 452 | req.cardId = item.CardId; |
... | ... | @@ -449,7 +458,7 @@ Page({ |
449 | 458 | } else { |
450 | 459 | //---后台要求要输入邀请码--- |
451 | 460 | if (th.data.isyaoqingma) { |
452 | - if (!th.data.inp_recommon) { | |
461 | + if (!th.data.inp_recommon && th.data.is_must_staff_yqma) { | |
453 | 462 | getApp().my_warnning("请输入邀请码", 0, th); |
454 | 463 | return false; |
455 | 464 | } |
... | ... | @@ -459,22 +468,26 @@ Page({ |
459 | 468 | getApp().my_warnning("邀请人不能填自已", 0, th); |
460 | 469 | return false; |
461 | 470 | } |
462 | - req.recommon = th.data.inp_recommon | |
471 | + if(th.data.inp_recommon) req.recommon = th.data.inp_recommon | |
463 | 472 | } |
464 | 473 | //--后台要求要输入营业员-- |
465 | 474 | if (th.data.is_salesman) { |
466 | - if (!th.data.inp_serviceman) { | |
475 | + if (!th.data.inp_serviceman && th.data.is_must_staff_yqma) { | |
467 | 476 | getApp().my_warnning("请输入营业员", 0, th); |
468 | 477 | th.setData({ |
469 | 478 | focus:true |
470 | 479 | }) |
471 | 480 | return false; |
472 | 481 | } |
473 | - req.serviceman = th.data.inp_serviceman | |
482 | + if(th.data.inp_serviceman) req.serviceman = th.data.inp_serviceman | |
474 | 483 | } |
475 | 484 | } |
476 | 485 | req.storeId = os.stoid; |
477 | 486 | req.userId = getApp().globalData.user_id; |
487 | + | |
488 | + | |
489 | + | |
490 | + | |
478 | 491 | //--如果有邀请码,和营业员的情况下-- |
479 | 492 | if (req.recommon || req.serviceman) { |
480 | 493 | |
... | ... | @@ -704,5 +717,21 @@ Page({ |
704 | 717 | }) |
705 | 718 | } |
706 | 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"); | |
707 | 734 | } |
735 | + | |
736 | + | |
708 | 737 | }) |
709 | 738 | \ No newline at end of file | ... | ... |
pages/user/plus/plus.wxml
... | ... | @@ -153,6 +153,12 @@ |
153 | 153 | 确认购买 |
154 | 154 | </view> |
155 | 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 | 162 | </view> |
157 | 163 | </view> |
158 | 164 | ... | ... |
pages/user/plus/plus.wxss
... | ... | @@ -384,7 +384,8 @@ swiper { |
384 | 384 | height: 50rpx; |
385 | 385 | border-radius: 25rpx; |
386 | 386 | color: rgb(255, 255, 255); |
387 | - margin: 55rpx 0rpx; | |
387 | + margin-top: 55rpx; | |
388 | + margin-bottom: 15rpx; | |
388 | 389 | background-position: center;background-repeat: no-repeat;background-size: cover |
389 | 390 | } |
390 | 391 | |
... | ... | @@ -423,4 +424,10 @@ swiper-item{ |
423 | 424 | left: -20%; |
424 | 425 | top: -2rpx; |
425 | 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 | 434 | \ No newline at end of file | ... | ... |