Commit 110c8b53d3e138da8fbbce699c8dbc5e6b910248

Authored by taiyuan
2 parents f84b9253 0e038a8b

Merge branch 'dev' of http://git.vipzhuang.cn/wxd/MShopWeApp into dev

components/goods_list/goods_list.wxml
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
12 <!-- 商品名称 --> 12 <!-- 商品名称 -->
13 <view class="goods_name ellipsis-2 fs28">{{item.goods_name}}</view> 13 <view class="goods_name ellipsis-2 fs28">{{item.goods_name}}</view>
14 <!-- 判断是否有活动价 --> 14 <!-- 判断是否有活动价 -->
15 - <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_id>0}}"> 15 + <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_id>0 && item.prom_type!=7}}">
16 <view class="pdt10"> 16 <view class="pdt10">
17 <view class="money flex xc-wc" > 17 <view class="money flex xc-wc" >
18 <text wx:if="{{item.prom_integral}}"><text class="fs35" style="font-weight: bold;">{{item.prom_integral}}</text>积分</text> 18 <text wx:if="{{item.prom_integral}}"><text class="fs35" style="font-weight: bold;">{{item.prom_integral}}</text>积分</text>
pages/goods/goodsList/goodsList.wxml
@@ -62,7 +62,7 @@ @@ -62,7 +62,7 @@
62 <view class="item-cont"> 62 <view class="item-cont">
63 <view class="title ellipsis-2">{{item.goods_name}}</view> 63 <view class="title ellipsis-2">{{item.goods_name}}</view>
64 <!-- 判断是否有活动价 --> 64 <!-- 判断是否有活动价 -->
65 - <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_id>0 }}"> 65 + <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_id>0 && item.prom_type!=7 }}">
66 <view class="flex on"> 66 <view class="flex on">
67 <!-- 活动价 --> 67 <!-- 活动价 -->
68 <view class="price"> 68 <view class="price">
pages/goods/search/search.wxml
@@ -35,7 +35,7 @@ @@ -35,7 +35,7 @@
35 <view class="item-cont"> 35 <view class="item-cont">
36 <view class="title ellipsis-2">{{item.goods_name}}</view> 36 <view class="title ellipsis-2">{{item.goods_name}}</view>
37 <!-- 判断是否有活动价,小程序没有有团购和拼单 --> 37 <!-- 判断是否有活动价,小程序没有有团购和拼单 -->
38 - <block wx:if="{{(item.prom_price>0 || item.prom_integral) && item.prom_id>0}}"> 38 + <block wx:if="{{(item.prom_price>0 || item.prom_integral) && item.prom_id>0 && item.prom_type!=7}}">
39 <!-- 活动价 --> 39 <!-- 活动价 -->
40 <view class="price"> 40 <view class="price">
41 <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text> 41 <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text>
pages/user/plus/plus.js
@@ -38,6 +38,9 @@ Page({ @@ -38,6 +38,9 @@ Page({
38 def_recommon: null, //分享人的手机号 38 def_recommon: null, //分享人的手机号
39 def_serviceman: null, //分享人的营业员 39 def_serviceman: null, //分享人的营业员
40 fir_leader: 0, //分享人的ID 40 fir_leader: 0, //分享人的ID
  41 + staffNo_arr: [], //多个营业员
  42 + focus:false,
  43 + is_select: false, //是否选择营业员过
41 }, 44 },
42 swiperChange: function (e) { 45 swiperChange: function (e) {
43 var currentId = e.detail.current; 46 var currentId = e.detail.current;
@@ -280,6 +283,21 @@ Page({ @@ -280,6 +283,21 @@ Page({
280 }) 283 })
281 } 284 }
282 }, 285 },
  286 +
  287 + //选择营业员
  288 + select_serviceman(e) {
  289 + let StaffNo = e.currentTarget.dataset.staffno;
  290 + let {req_data,req} = this.data;
  291 + if (StaffNo || StaffNo !== "") {
  292 + req_data.staffNo = StaffNo;
  293 + req.serviceman = StaffNo;
  294 + };
  295 + this.setData({
  296 + is_select: 1,
  297 + staffNo_arr:[],
  298 + })
  299 + this.check_serviceman(req_data,req)
  300 + },
283 //--绑定邀请码的输入-- 301 //--绑定邀请码的输入--
284 b_input: function (e) { 302 b_input: function (e) {
285 var value = e.detail.value.trim(); 303 var value = e.detail.value.trim();
@@ -299,6 +317,7 @@ Page({ @@ -299,6 +317,7 @@ Page({
299 }, 317 },
300 //--立即购买卡-- 318 //--立即购买卡--
301 buy_card: async function () { 319 buy_card: async function () {
  320 + console.log(11111);
302 var th = this; 321 var th = this;
303 var is_card = 0; 322 var is_card = 0;
304 //--商家是不是有等级卡功能,开通的人数是不是够用,开通是时间是不是到期-- 323 //--商家是不是有等级卡功能,开通的人数是不是够用,开通是时间是不是到期--
@@ -341,6 +360,9 @@ Page({ @@ -341,6 +360,9 @@ Page({
341 if (th.data.is_salesman) { 360 if (th.data.is_salesman) {
342 if (!th.data.inp_serviceman) { 361 if (!th.data.inp_serviceman) {
343 getApp().my_warnning("请输入营业员", 0, th); 362 getApp().my_warnning("请输入营业员", 0, th);
  363 + th.setData({
  364 + focus:true
  365 + })
344 return false; 366 return false;
345 } 367 }
346 req.serviceman = th.data.inp_serviceman 368 req.serviceman = th.data.inp_serviceman
@@ -350,37 +372,93 @@ Page({ @@ -350,37 +372,93 @@ Page({
350 req.userId = getApp().globalData.user_id; 372 req.userId = getApp().globalData.user_id;
351 //--如果有邀请码,和营业员的情况下-- 373 //--如果有邀请码,和营业员的情况下--
352 if (req.recommon || req.serviceman) { 374 if (req.recommon || req.serviceman) {
  375 +
353 var req_data = { 376 var req_data = {
354 storeId: os.stoid, 377 storeId: os.stoid,
355 userId: req.userId 378 userId: req.userId
356 }; 379 };
357 if (req.recommon) req_data.inviteCode = req.recommon; 380 if (req.recommon) req_data.inviteCode = req.recommon;
358 if (req.serviceman) req_data.staffNo = req.serviceman; 381 if (req.serviceman) req_data.staffNo = req.serviceman;
359 - getApp().request.get("/api/weshop/plus/vip/mem/referee/code/check", {  
360 - data: req_data,  
361 - success: function (res) {  
362 - if (res.data.code == 0) {  
363 - t_pay.pay(req, th.success, function () {  
364 - getApp().my_warnning("支付失败", 0, th);  
365 - });  
366 - } else {  
367 - getApp().my_warnning(res.data.msg, 0, th);  
368 - }  
369 - } 382 + th.setData({
  383 + req_data,
  384 + req,
370 }) 385 })
  386 + th.check_serviceman(req_data,req)
  387 + // getApp().request.get("/api/weshop/plus/vip/mem/referee/code/check", {
  388 + // data: req_data,
  389 + // success: function (res) {
  390 + // if (res.data.code == 0) {
  391 + // if(res.data.data.length > 1 && !th.data.is_select){
  392 + // th.setData({
  393 + // staffNo_arr:res.data.data
  394 + // })
  395 + // }else{
  396 + // t_pay.pay(req, th.success, function () {
  397 + // getApp().my_warnning("支付失败", 0, th);
  398 + // th.setData({
  399 + // is_select:0,
  400 + // })
  401 + // });
  402 + // }
  403 + // } else {
  404 + // getApp().my_warnning(res.data.msg, 0, th);
  405 + // th.setData({
  406 + // is_select:0,
  407 + // })
  408 + // }
  409 + // }
  410 + // })
371 } else { 411 } else {
372 t_pay.pay(req, th.success, function () { 412 t_pay.pay(req, th.success, function () {
373 getApp().my_warnning("支付失败", 0, th); 413 getApp().my_warnning("支付失败", 0, th);
  414 + th.setData({
  415 + is_select:0,
  416 + focus:true,
  417 + })
374 }); 418 });
375 - } 419 + }
376 }, 420 },
377 //返回会员页面 421 //返回会员页面
378 OpeningClose: function () { 422 OpeningClose: function () {
379 this.setData({ 423 this.setData({
380 - open_yq: 0 424 + open_yq: 0,
  425 + inp_serviceman:""
381 }); 426 });
382 }, 427 },
383 - 428 + dialog_close() {
  429 + this.setData({
  430 + staffNo_arr: [],
  431 + });
  432 + },
  433 + check_serviceman(data,req) {
  434 + let th = this;
  435 + getApp().request.get("/api/weshop/plus/vip/mem/referee/code/check", {
  436 + data,
  437 + success: function (res) {
  438 + if (res.data.code == 0) {
  439 + if (res.data.data.length > 1 && !th.data.is_select) {
  440 + th.setData({
  441 + staffNo_arr: res.data.data
  442 + })
  443 + }else{
  444 + t_pay.pay(req, th.success, function () {
  445 + getApp().my_warnning("支付失败", 0, th);
  446 + th.setData({
  447 + is_select:0,
  448 + focus:true,
  449 + })
  450 + });
  451 + }
  452 + } else {
  453 + getApp().my_warnning(res.data.msg, 0, th);
  454 + th.setData({
  455 + is_select:0,
  456 + focus:true,
  457 + })
  458 + }
  459 + }
  460 + })
  461 + },
384 //返回会员中心 462 //返回会员中心
385 back_user: function () { 463 back_user: function () {
386 setTimeout(function () { 464 setTimeout(function () {
@@ -409,7 +487,6 @@ Page({ @@ -409,7 +487,6 @@ Page({
409 url: u_url 487 url: u_url
410 }) 488 })
411 } 489 }
412 -  
413 }, 490 },
414 491
415 492
pages/user/plus/plus.wxml
1 <block wx:if="{{is_show && (fir_leader?is_fengxiang:1)}}"> 1 <block wx:if="{{is_show && (fir_leader?is_fengxiang:1)}}">
2 -<!-- 我的会员背景图片 -->  
3 -<import src="../../../utils/wxParse/wxParse.wxml"></import>  
4 -<view>  
5 - <image class="Member_bk" src="{{url}}/miniapp/images/plus/page_bk.png"></image>  
6 -</view>  
7 -<view class="plus">  
8 - <!-- 开通会员模块 --> 2 + <!-- 我的会员背景图片 -->
  3 + <import src="../../../utils/wxParse/wxParse.wxml"></import>
  4 + <view>
  5 + <image class="Member_bk" src="{{url}}/miniapp/images/plus/page_bk.png"></image>
  6 + </view>
  7 + <view class="plus">
  8 + <!-- 开通会员模块 -->
9 9
10 - <block wx:if="{{is_plusCard}}">  
11 - <view class="Opening_plus">  
12 - <view class="Opening_bk">  
13 - <image src="{{url}}/miniapp/images/plus/card_bk.png"></image>  
14 - </view>  
15 - <view class="swiper"> 10 + <block wx:if="{{is_plusCard}}">
  11 + <view class="Opening_plus">
  12 + <view class="Opening_bk">
  13 + <image src="{{url}}/miniapp/images/plus/card_bk.png"></image>
  14 + </view>
  15 + <view class="swiper">
16 <!-- 未开通会员swiper-item --> 16 <!-- 未开通会员swiper-item -->
17 <swiper current="{{currentId}}" current-item-id="{{currentId}}" next-margin="60rpx" previous-margin="60rpx" bindchange="swiperChange"> 17 <swiper current="{{currentId}}" current-item-id="{{currentId}}" next-margin="60rpx" previous-margin="60rpx" bindchange="swiperChange">
18 <swiper-item class="flex" item-id="{{index}}" data-item-id="{{index}}" wx:for="{{is_plusCard}}"> 18 <swiper-item class="flex" item-id="{{index}}" data-item-id="{{index}}" wx:for="{{is_plusCard}}">
19 19
20 - <view class="Membership {{currentId==index?'enlarge':''}}" style=" background-image: url({{item.CardImg}});color:{{item.CardColor}}"> 20 + <view class="Membership {{currentId==index?'enlarge':''}}" style=" background-image: url({{item.CardImg}});color:{{item.CardColor}}">
21 <view class="flex-space-between Membership_go"> 21 <view class="flex-space-between Membership_go">
22 <view> 22 <view>
23 <view class="fs36">{{item.CardName}}</view> 23 <view class="fs36">{{item.CardName}}</view>
@@ -32,7 +32,7 @@ @@ -32,7 +32,7 @@
32 32
33 <view class="flex-vertical fs24" style="overflow:hidden"> 33 <view class="flex-vertical fs24" style="overflow:hidden">
34 34
35 - <view class="Member"style="background-image:url('{{url}}/miniapp/images/plus/privilege_o.png');filter: drop-shadow( 40rpx 0rpx 0rpx {{item.CardColor}});"></view> 35 + <view class="Member" style="background-image:url('{{url}}/miniapp/images/plus/privilege_o.png');filter: drop-shadow( 40rpx 0rpx 0rpx {{item.CardColor}});"></view>
36 <view style="margin-left:5rpx;white-space: nowrap;">按去年用户消费计算,开卡后一年预计省¥{{item.free}}元 36 <view style="margin-left:5rpx;white-space: nowrap;">按去年用户消费计算,开卡后一年预计省¥{{item.free}}元
37 </view> 37 </view>
38 </view> 38 </view>
@@ -41,76 +41,80 @@ @@ -41,76 +41,80 @@
41 41
42 </swiper-item> 42 </swiper-item>
43 </swiper> 43 </swiper>
  44 + </view>
44 </view> 45 </view>
45 - </view>  
46 - </block> 46 + </block>
47 47
48 - <!-- 会员礼遇 -->  
49 - <view class="Courtesy"> 48 + <!-- 会员礼遇 -->
  49 + <view class="Courtesy">
  50 +
  51 + <!-- 标题 -->
  52 + <view class="flex-center" style="width:100%;height:200rpx;">
  53 + <view>
  54 + <view class="Courtesy_title flex-center fs36">开通PLUS会员尊享礼遇
  55 + </view>
50 56
51 - <!-- 标题 -->  
52 - <view class="flex-center" style="width:100%;height:200rpx;">  
53 - <view>  
54 - <view class="Courtesy_title flex-center fs36">开通PLUS会员尊享礼遇  
55 - </view>  
56 -  
57 57
58 58
59 - <view class="flex-center">  
60 - <image class="Courtesy_image" src="{{url}}/miniapp/images/plus/Courtesy.png"></image> 59 + <view class="flex-center">
  60 + <image class="Courtesy_image" src="{{url}}/miniapp/images/plus/Courtesy.png"></image>
61 61
62 -  
63 - <view class="Courtesy_can fs24">PLUS会员可享受以下特权 62 +
  63 + <view class="Courtesy_can fs24">PLUS会员可享受以下特权
  64 + </view>
  65 +
  66 + <image class="Courtesy_image" src="{{url}}/miniapp/images/plus/Courtesy.png"></image>
64 </view> 67 </view>
  68 + </view>
  69 + </view>
  70 +
65 71
66 - <image class="Courtesy_image" src="{{url}}/miniapp/images/plus/Courtesy.png"></image> 72 +
  73 + <!-- 会员权益内容 -->
  74 + <view class="Courtesy_comment " style="padding:0 20rpx" wx:if="{{is_card_rule!=null&&is_card_rule!=''}}">
  75 + <view class="wxParse">
  76 + <template is="wxParse" data="{{wxParseData:content.nodes}}"></template>
67 </view> 77 </view>
68 </view> 78 </view>
69 </view> 79 </view>
70 80
71 - <!-- 会员权益内容 -->  
72 - <view class="Courtesy_comment " style="padding:0 20rpx" wx:if="{{is_card_rule!=null&&is_card_rule!=''}}">  
73 - <view class="wxParse">  
74 - <template is="wxParse" data="{{wxParseData:content.nodes}}"></template>  
75 - </view>  
76 - </view>  
77 - </view> 81 + <!-- 好物推荐 -->
  82 + <!-- 好物推荐 -->
  83 + <view class="title">
  84 + <!-- 标题 -->
  85 + <view>
  86 + <!-- 中文名标题 -->
  87 + <view class="China flex-level">
  88 + <view class="line flex-vertical">
  89 + <view class="one"></view>
  90 + <view class="two"></view>
  91 + <view class="three"></view>
  92 + </view>
78 93
79 - <!-- 好物推荐 -->  
80 - <!-- 好物推荐 -->  
81 - <view class="title">  
82 - <!-- 标题 -->  
83 - <view>  
84 - <!-- 中文名标题 -->  
85 - <view class="China flex-level">  
86 - <view class="line flex-vertical">  
87 - <view class="one"></view><view class="two"></view><view class="three"></view>  
88 - </view> 94 + <view class="Recommend flex-level" bindtap="requestList">好物推荐</view>
89 95
90 - <view class="Recommend flex-level" bindtap="requestList">好物推荐</view> 96 + <view class="line flex-vertical">
  97 + <view class="three"></view>
  98 + <view class="two"></view>
  99 + <view class="one"></view>
  100 + </view>
  101 + </view>
91 102
92 - <view class="line flex-vertical">  
93 - <view class="three"></view>  
94 - <view class="two"></view>  
95 - <view class="one"></view> 103 + <!-- 英文标题 -->
  104 + <view class="english flex-center">
  105 + <view class="silk"></view>
  106 + <view class="esh five-level-word">GOOD HOT THING</view>
  107 + <view class="silk"></view>
96 </view> 108 </view>
97 - </view>  
98 109
99 - <!-- 英文标题 -->  
100 - <view class="english flex-center">  
101 - <view class="silk"></view>  
102 - <view class="esh five-level-word">GOOD HOT THING</view>  
103 - <view class="silk"></view>  
104 </view> 110 </view>
  111 + <!-- 商品列表组件 -->
  112 + <goods_recommend id="goods_list"></goods_recommend>
  113 + <!-- 商品列表 -->
105 114
106 </view> 115 </view>
107 - <!-- 商品列表组件 -->  
108 - <goods_recommend id="goods_list"></goods_recommend>  
109 - <!-- 商品列表 -->  
110 116
111 </view> 117 </view>
112 -  
113 -</view>  
114 </block> 118 </block>
115 119
116 <!-- 开通会员弹窗 --> 120 <!-- 开通会员弹窗 -->
@@ -127,32 +131,54 @@ @@ -127,32 +131,54 @@
127 <view class="fs36 flex-level perfect">请完善下面信息</view> 131 <view class="fs36 flex-level perfect">请完善下面信息</view>
128 <view class="fillin"> 132 <view class="fillin">
129 <!-- 输入推荐人手机号 --> 133 <!-- 输入推荐人手机号 -->
130 - <view class="flex ai_and Enter_phone" wx:if="{{isyaoqingma}}" > 134 + <view class="flex ai_and Enter_phone" wx:if="{{isyaoqingma}}">
131 <image class="phone_image" src="{{url}}/miniapp/images/plus/Invitation_code.png"></image> 135 <image class="phone_image" src="{{url}}/miniapp/images/plus/Invitation_code.png"></image>
132 <view class="phone"> 136 <view class="phone">
133 - <input bindinput="b_input" data-name="inp_recommon" class="fs30" placeholder="请输入邀请码(推荐人手机号)" type="number" maxlength="20" /> 137 + <input bindinput="b_input" bindconfirm="buy_card" data-name="inp_recommon" class="fs30" placeholder="请输入邀请码(推荐人手机号)" type="number" maxlength="20" />
134 </view> 138 </view>
135 </view> 139 </view>
136 <!-- 输入营业员 --> 140 <!-- 输入营业员 -->
137 <view class="flex ai_and enter_SalesClerk" wx:if="{{is_salesman}}"> 141 <view class="flex ai_and enter_SalesClerk" wx:if="{{is_salesman}}">
138 <image class="SalesClerk_image" src="{{url}}/miniapp/images/plus/Sales_Clerk.png"></image> 142 <image class="SalesClerk_image" src="{{url}}/miniapp/images/plus/Sales_Clerk.png"></image>
139 <view class="SalesClerk"> 143 <view class="SalesClerk">
140 - <input bindinput="b_input" class="fs30" data-name="inp_serviceman" placeholder="请输入营业员" maxlength="30" /> 144 + <input bindinput="b_input" bindconfirm="buy_card" class="fs30" focus="{{focus}}" data-name="inp_serviceman" value="{{inp_serviceman}}" placeholder="请输入营业员" maxlength="30" />
141 </view> 145 </view>
142 </view> 146 </view>
143 <!-- 确认购买 --> 147 <!-- 确认购买 -->
144 <view class="flex-center" bindtap="buy_card"> 148 <view class="flex-center" bindtap="buy_card">
145 - <view class="flex-center purchase"  
146 - style="background-image:url({{url}}/miniapp/images/plus/purchase_Bk.png);"> 149 + <view class="flex-center purchase" style="background-image:url({{url}}/miniapp/images/plus/purchase_Bk.png);">
147 确认购买 150 确认购买
148 </view> 151 </view>
149 </view> 152 </view>
150 </view> 153 </view>
151 </view> 154 </view>
  155 +
152 <view class="flex-level"> 156 <view class="flex-level">
153 <image class="purchaseClose" bindtap="OpeningClose" src="{{url}}/miniapp/images/plus/Close.png"></image> 157 <image class="purchaseClose" bindtap="OpeningClose" src="{{url}}/miniapp/images/plus/Close.png"></image>
154 </view> 158 </view>
155 </view> 159 </view>
156 160
157 </view> 161 </view>
  162 +
  163 +<view class="Disgraceful" wx:if="{{staffNo_arr.length>0}}">
  164 + <view bindtap="OpeningClose"></view>
  165 + <view class="dialog_body">
  166 + <view style="background-color: #fff;">
  167 + <view class="dialog_choose">
  168 + <text>请选择营业员</text>
  169 + <text class="dialog_close" bindtap="dialog_close">X</text>
  170 + </view>
  171 + <view class="dialog_name">
  172 + <text class="w50">编号</text>
  173 + <text class="w50">姓名</text>
  174 + </view>
  175 + </view>
  176 + <view class="dialog_name" bindtap="select_serviceman" data-StaffNo="{{item.StaffNo}}" wx:for="{{staffNo_arr}}" wx:key="id" hover-class="weui-active" hover-start-time="200" style="background-color: #fff;">
  177 + <view class="w50">{{item.StaffNo}}</view>
  178 + <view class="w50">{{item.StaffName}}</view>
  179 + </view>
  180 + </view>
  181 +</view>
  182 +
  183 +
158 <warn id="warn"></warn> 184 <warn id="warn"></warn>
159 \ No newline at end of file 185 \ No newline at end of file
pages/user/plus/plus.wxss
@@ -16,7 +16,48 @@ page { @@ -16,7 +16,48 @@ page {
16 width: 100%; 16 width: 100%;
17 height: 100%; 17 height: 100%;
18 } 18 }
19 - 19 +.dialogful{
  20 + position: fixed;
  21 + left: 0;
  22 + top: 15%;
  23 + right: 0;
  24 + bottom: 0;
  25 + z-index: 11;
  26 + background: rgba(0, 0, 0, 0.6);
  27 + width: 100%;
  28 + height: 100%;
  29 +}
  30 +.dialog_body {
  31 + margin:30% auto;
  32 + width: 660rpx;
  33 +}
  34 +.dialog_close{
  35 + float: right;
  36 + width: 50rpx;
  37 + height: 50rpx;
  38 + text-align: right;
  39 +}
  40 +.dialog_choose{
  41 + position: relative;
  42 + padding: 20rpx;
  43 + border-bottom: 1rpx solid #eee;
  44 +}
  45 +.dialog_name,
  46 +.dialog_content {
  47 + padding: 10rpx;
  48 + display: flex;
  49 + border-bottom: 1rpx solid #f7f7f7;
  50 + justify-content: space-around;
  51 +
  52 +}
  53 +.weui-active{
  54 + opacity: 0.9;
  55 + background: #f7f7f7;
  56 +}
  57 +.w50 {
  58 + width: 50%;
  59 + text-align: center;
  60 +}
20 .Opening_bk image { 61 .Opening_bk image {
21 position: absolute; 62 position: absolute;
22 z-index: 2; 63 z-index: 2;