diff --git a/components/diy_advertising/diy_advertising.wxml b/components/diy_advertising/diy_advertising.wxml index fe1a1ae..649845c 100644 --- a/components/diy_advertising/diy_advertising.wxml +++ b/components/diy_advertising/diy_advertising.wxml @@ -410,11 +410,17 @@ - + + + {{item.title}} + - + + + {{item.title}} + diff --git a/components/diy_advertising/diy_advertising.wxss b/components/diy_advertising/diy_advertising.wxss index 72e1551..31c43fa 100644 --- a/components/diy_advertising/diy_advertising.wxss +++ b/components/diy_advertising/diy_advertising.wxss @@ -331,3 +331,5 @@ } .clicle{ width: 20rpx; height: 20rpx} .dots{ position: absolute; bottom: 10rpx; width: 100%; display: flex; justify-content: center} +.title{ position: absolute; left: 0; bottom: 0; background-color: rgba(6,6,6,0.5); font-size: 30rpx; + text-indent: 10rpx;width: 100%; height: 50rpx; line-height: 50rpx; color: #fff} diff --git a/components/diy_service/diy_service.js b/components/diy_service/diy_service.js new file mode 100644 index 0000000..bebbbbe --- /dev/null +++ b/components/diy_service/diy_service.js @@ -0,0 +1,61 @@ +Component({ + properties: { + // 这里定义了innerText属性,属性值可以在组件使用时指定 + object:{ + type: Object, + value:null + }, + }, + data: { + iurl:getApp().globalData.setting.imghost + }, + + lifetimes: { + attached: function() { + var th=this; + //----获取系统参数----- + getApp().getConfig2(function(e) { + var json_d = JSON.parse(e.switch_list); + th.setData({ sys_switch:json_d, }) + }) + } + }, + + methods: { + berror:function(e){ + var iurl=getApp().globalData.setting.imghost; + var ob={}; + var txt="object.title_img"; + ob[txt] = iurl +'/miniapp/images/logo.png'; + this.setData(ob); + }, + + //-- 跳到绑定注册会员 -- + go_user:function(){ + getApp().goto('/pages/getphone/getphone'); + return false; + }, + + //---------联系客服------------ + contactService: function() { + getApp().getConfig(function(t) { + if (t.store_tel == undefined) { + getApp().request.get("/api/weshop/store/get/" + os.stoid, { + isShowLoading: 1, + data: {}, + success: function(rs) { + getApp().globalData.config = rs.data.data; + if (rs.data.data.store_tel == null && rs.data.data.store_tel == undefined) { + getApp().my_warnning("商家未设置电话", 0, th); + return false; + } + wx.makePhoneCall({ phoneNumber: rs.data.data.store_tel, }) + } + }) + } else { + wx.makePhoneCall({ phoneNumber: t.store_tel, }) + } + }); + }, + } +}) diff --git a/components/diy_service/diy_service.json b/components/diy_service/diy_service.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/components/diy_service/diy_service.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/components/diy_service/diy_service.wxml b/components/diy_service/diy_service.wxml new file mode 100644 index 0000000..d287119 --- /dev/null +++ b/components/diy_service/diy_service.wxml @@ -0,0 +1,26 @@ + + + + + + + {{object.title}} + + + + + + + + + + + {{object.title}} + + + \ No newline at end of file diff --git a/components/diy_service/diy_service.wxss b/components/diy_service/diy_service.wxss new file mode 100644 index 0000000..d0bf844 --- /dev/null +++ b/components/diy_service/diy_service.wxss @@ -0,0 +1,6 @@ +.custom-service{ width: 116rpx; height: 116rpx; border-radius: 50%; background-color: #fff;z-index: 100; + border: 1px solid #adadad; box-shadow: 0 0 10px 2px #adadad; line-height: 28rpx; + position: fixed; top: 40%; right: 2rpx; display: flex;align-items: center;justify-content: center;} + + .cs-img{ width: 36rpx; height: 36rpx;} +.s_title{ font-size: 20rpx;} \ No newline at end of file diff --git a/packageA/pages/quan_list/quan_list.js b/packageA/pages/quan_list/quan_list.js index 66bcb83..44058ac 100644 --- a/packageA/pages/quan_list/quan_list.js +++ b/packageA/pages/quan_list/quan_list.js @@ -19,6 +19,7 @@ Page({ loading:0, get_item:null, show_success:0, + getcurday:null, }, //------初始化加载---------- onLoad: function(t) { @@ -36,6 +37,8 @@ Page({ //券的模拟数据 //var data = [{ is_get:0,money:50,condition:500,id:1,name: "券名字", endtype: 0, use_start_time: 1579596090, use_end_time: 1611218490, everyone_num: 2,interval_time:1,color:"red"}]; //th.setData({dataList: data}); + + this.setData({getcurday:ut.gettimestamp()}); }, onHide: function() { diff --git a/packageA/pages/quan_list/quan_list.wxml b/packageA/pages/quan_list/quan_list.wxml index b2fe076..0840d24 100644 --- a/packageA/pages/quan_list/quan_list.wxml +++ b/packageA/pages/quan_list/quan_list.wxml @@ -18,11 +18,12 @@ {{item.name}} 所有门店通用 - 有效期 - {{filters.format_time(item.use_start_time)}}至 + 有效期 + {{filters.format_time(getcurday+3600*24*item.startdays)}} + {{filters.format_time(item.use_start_time)}} {{filters.format_time(item.use_end_time)}}不限 - 有效期{{item.days}}天不限 + 有效期 {{filters.format_time(getcurday+3600*24*item.startdays)}}至 {{filters.format_time(getcurday+3600*24*item.days)}}不限 每人限领:{{item.everyone_num}}不限 diff --git a/packageA/pages/quan_pro/quan_pro.js b/packageA/pages/quan_pro/quan_pro.js index a3e9906..6484b13 100644 --- a/packageA/pages/quan_pro/quan_pro.js +++ b/packageA/pages/quan_pro/quan_pro.js @@ -14,6 +14,7 @@ Page({ q_data: null, id:null, config2:null, + getcurday:null }, //------初始化加载---------- @@ -38,6 +39,8 @@ Page({ th.setData({q_data:res.data.data.pageData[0]}); } }); + + th.setData({getcurday:ut.gettimestamp()}); }, onHide: function() { diff --git a/packageA/pages/quan_pro/quan_pro.wxml b/packageA/pages/quan_pro/quan_pro.wxml index 3ff4c39..e2c79f5 100644 --- a/packageA/pages/quan_pro/quan_pro.wxml +++ b/packageA/pages/quan_pro/quan_pro.wxml @@ -23,11 +23,15 @@ 满{{filters.toFix(q_data.condition,2)}}可用 - 有效期 - {{filters.format_time(q_data.use_start_time)}}至 - {{filters.format_time(q_data.use_end_time)}}不限 + 有效期 + {{filters.format_time(getcurday+3600*24*q_data.startdays)}} + {{filters.format_time(q_data.use_start_time)}}至 + {{filters.format_time(q_data.use_end_time)}}不限 - 有效期{{q_data.days}}天不限 + 有效期 + + {{filters.format_time(getcurday+3600*24*q_data.startdays)}}至 + {{filters.format_time(getcurday+3600*24*q_data.days)}}不限 diff --git a/pages/cart/cart2/c_filter.wxs b/pages/cart/cart2/c_filter.wxs index 6a74c7e..7216131 100644 --- a/pages/cart/cart2/c_filter.wxs +++ b/pages/cart/cart2/c_filter.wxs @@ -15,6 +15,7 @@ var filters = { if(ind==2) return "blue"; if(ind==11) return "green"; if(ind==12) return "blue"; + if(ind==20) return "green"; return ""; }, setbgcolor: function (ind) { @@ -23,6 +24,7 @@ var filters = { if (ind == 2) return "#a3bcff"; if (ind == 11) return "#59e1d2"; if (ind == 12) return "#a3bcff"; + if (ind == 20) return "#6d87cd"; return ""; }, @@ -32,6 +34,7 @@ var filters = { if (ind == 2) return "品类"; if (ind == 11) return "用途"; if (ind == 12) return "分类1"; + if (ind == 20) return "指定单品"; return ""; }, get_type_card:function(ind){ @@ -40,6 +43,7 @@ var filters = { if (ind == 2) return "指定品类"; if (ind == 11) return "指定用途"; if (ind == 12) return "指定分类1"; + if (ind == 20) return "指定单品"; return ""; }, format_huiche:function (text) { diff --git a/pages/cart/cart2/cart2.js b/pages/cart/cart2/cart2.js index 78c1dec..376b3f8 100644 --- a/pages/cart/cart2/cart2.js +++ b/pages/cart/cart2/cart2.js @@ -706,16 +706,43 @@ Page({ cart_item.prom_pt_json=[{"prom_id":item_map.prom_id,"dis":(item_map.price-item_map.prom_price).toFixed(2),"ispt":0}]; } + //-- 如果系统要平摊到单品 -- + //if(!th.data.ispt_goods){ + var pt_data={ + 'prom_id':item_map.prom_id, + 'dis': parseFloat((item_map.price-item_map.prom_price).toFixed(2)), + 'goods':item_map.goods + } + + var pt_res=null; + await getApp().request.promisePost("/api/weshop/order/getGoodsSplit",{is_json:1,data:pt_data}).then(res=>{ + if(res.data.code==0){ pt_res=res.data.data; } + }) + if(pt_res){ + for (var io in item_map.goods){ + //平摊赋值 + item_map.goods[io].account_fir=th.arr_get_goods(item_map.goods[io].goods_id,pt_res).fisrt_account; + item_map.goods[io].account_yu_fir=th.arr_get_goods(item_map.goods[io].goods_id,pt_res).fisrt_account_yu; + if(!th.data.ispt_goods){ + item_map.goods[io].account=item_map.goods[io].account_fir; + item_map.goods[io].account_yu=item_map.goods[io].account_yu_fir; + } + } + } + // } + o_price-=(item_map.price-item_map.prom_price); //如果有限制使用优惠券,就要减掉参与的活动商品的钱 if(!item_map.is_xz_yh) q_conditin=o_price; } - + //--------循环计算商品是不是包邮,是不是使用优惠券,此时循环是商品从表----------- for(var j=0;j0 && !th.data.ispt_goods){ + var g_arr=new Array(); + g_arr.push(goods); + var pt_data={ + 'prom_id':goods.prom_id, + 'dis': parseFloat(th.data.formData.cut_price), + 'goods':g_arr, + } + + var pt_res=null; + await getApp().request.promisePost("/api/weshop/order/getGoodsSplit",{is_json:1,data:pt_data}).then(res=>{ + if(res.data.code==0){ pt_res=res.data.data; } + }) + if(pt_res){ + //平摊赋值 + goods.account=pt_res[0].fisrt_account; + goods.account_yu=pt_res[0].fisrt_account_yu; + } + } + + //--组装优惠券的钱-- if(th.data.formData.coupon_price){ item.coupon_price=th.data.formData.coupon_price; @@ -1653,6 +1703,13 @@ Page({ } } + //把优惠的平摊结果写进去 + if(g_item.account>=0 || g_item.account_yu!=0){ + if(g_item.account>=0) goods.account=g_item.account; + if(g_item.account_yu!=0) goods.account_yu=g_item.account_yu; + item.is_discount_amount=1; + } + //导购ID if(g_item.guide_id){ goods.guide_id=g_item.guide_id; @@ -2082,17 +2139,60 @@ Page({ /*--点击选择券--*/ sele_quan_item:function(e) { + + var ind = e.currentTarget.dataset.ind; + var quan_item=this.data.selected_quan_list[ind]; + var pickid=this.data.selected_quan_pick; //现在选择的是哪一个门店 + //--如果券是单品使用的时候-- + if(quan_item.UseObjectType=="20"){ + //---只有多件购买的时候才要计算,//购物车购买和搭配勾的时候--- + var gg=getApp().get_b_now(); + if(this.data.is_b_now==0 || this.data.gg.prom_type==5){ + var arr=this.data.order_prom_list_cart; + var t_pk_item=null; + for(var ii in arr){ + var ep=arr[ii]; + if(pickid==ep.pickup_id){ + t_pk_item=ep; break; + } + } + //--寻找券指定的商品-- + var gd=null; + if(t_pk_item){ + var goods=t_pk_item.goods; + for(var gid in goods){ + if(quan_item.UseObjectID==goods[gid].erpwareid){ gd=goods[gid]; } + } + } + if(!gd){ + getApp().my_warnning("未找到指定商品使用",0,this,600); + return false; + } + //计算价格,如果有平摊的实收要计算实收的金额 + var item_price=gd.goods_price*gd.goods_num; + //-- 如果有平摊下去,有实收价格的时候,就要用account_fir来计算价格 -- + if(gd.account_fir!=null && gd.account_fir!=undefined){ + item_price=gd.account_fir*gd.goods_num; + } + + if(item_price< parseFloat(quan_item.BuySum)){ + getApp().my_warnning("该单品金额没有大于等于"+quan_item.BuySum+"元时不能使用优惠券",0,this,600); + return false; + } + } + } + var no_use=e.currentTarget.dataset.no, quanlist=this.data.selected_quan_list; //---所有的券的显示红色选择都清理一遍--- - for(var ind in quanlist){ - quanlist[ind].show_red=0; + for(var i in quanlist){ + quanlist[i].show_red=0; } this.setData({selected_quan_list:quanlist}); var by_quanlist=this.data.get_by_quan_list; if(by_quanlist){ //---所有的券的显示红色选择都清理一遍--- - for(var ind in by_quanlist){ - by_quanlist[ind].show_red=0; + for(var inb in by_quanlist){ + by_quanlist[inb].show_red=0; } this.setData({get_by_quan_list:by_quanlist}); } @@ -2121,11 +2221,9 @@ Page({ return; } - var ind = e.currentTarget.dataset.ind; - - var quan_item = this.data.selected_quan_list[ind]; + + var txt = "selected_quan_list[" + ind + "].show_red"; - var obj = {}; obj[txt] = 1; if (quan_item.show_red) { @@ -2474,7 +2572,12 @@ Page({ } is_xz_yh=0; var item_price=gd.goods_price*gd.goods_num; + //-- 如果有平摊下去,有实收价格的时候,就要用account来计算价格 -- + if(gd.account_fir!=null && gd.account_fir!=undefined){ + item_price=gd.account_fir*gd.goods_num; + } ckeck_quan_price+=item_price; + //--组装价格list-- if (check_quan_price_list) { check_quan_price_list += "," +item_price; @@ -2755,11 +2858,17 @@ Page({ }, //从优惠的映射中拿出商品从表的item - item_map_get_goods:function(goods_id,map){ - for(var i in map.goods){ - if(map.goods[i].goods_id==goods_id) return map.goods[i]; - } - } + item_map_get_goods:function(goods_id,map){ + for(var i in map.goods){ + if(map.goods[i].goods_id==goods_id) return map.goods[i]; + } + }, + //从优惠的映射中拿出商品从表的item + arr_get_goods:function(goods_id,arr){ + for(var i in arr){ + if(arr[i].goods_id==goods_id) return arr[i]; + } + } }); diff --git a/pages/index/index/index.json b/pages/index/index/index.json index 3a921ec..66a0ff2 100644 --- a/pages/index/index/index.json +++ b/pages/index/index/index.json @@ -16,6 +16,7 @@ "richtext": "/components/diy_richtext/diy_richtext", "assist":"/components/diy_assist/diy_assist", "picMax": "/components/diy_picMax/diy_picMax", - "mvideo": "/components/diy_video/diy_video" + "mvideo": "/components/diy_video/diy_video", + "service": "/components/diy_service/diy_service" } } \ No newline at end of file diff --git a/pages/index/index/index.wxml b/pages/index/index/index.wxml index 0d6c695..0b7d353 100644 --- a/pages/index/index/index.wxml +++ b/pages/index/index/index.wxml @@ -339,7 +339,12 @@ - + + + + + + diff --git a/pages/template/index.json b/pages/template/index.json index 4fc1363..1443fce 100644 --- a/pages/template/index.json +++ b/pages/template/index.json @@ -17,6 +17,7 @@ "richtext": "/components/diy_richtext/diy_richtext", "assist":"/components/diy_assist/diy_assist", "picMax": "/components/diy_picMax/diy_picMax", - "mvideo": "/components/diy_video/diy_video" + "mvideo": "/components/diy_video/diy_video", + "service": "/components/diy_service/diy_service" } } \ No newline at end of file diff --git a/pages/template/index.wxml b/pages/template/index.wxml index 4238850..0dbbeea 100644 --- a/pages/template/index.wxml +++ b/pages/template/index.wxml @@ -53,6 +53,10 @@ + + + + diff --git a/pages/user/Detailed/Detailed.js b/pages/user/Detailed/Detailed.js index 83a71af..1e4274a 100644 --- a/pages/user/Detailed/Detailed.js +++ b/pages/user/Detailed/Detailed.js @@ -33,6 +33,10 @@ Page({ imagePath:"", //分享的生成图片 canvasHidden:true, + isBind:true, + isBinds:true, + + input_val:null, }, /** @@ -108,20 +112,36 @@ Page({ selectDetailed: function() { var th = this, e = th; + var r_data={ + storeId: o.stoid, + userId: r.user_id, + page: th.data.page, + pageSize: th.data.pageSize + }; + + if(th.data.datet!="" && th.data.datet){ + r_data.Sdate=th.data.datet; + } + if(th.data.dates!="" && th.data.dates){ + r_data.Edate=th.data.dates; + } + if(th.data.input_val!="" && th.data.input_val){ + r_data.MobileTel=th.data.input_val; + } + getApp().request.promiseGet("/api/weshop/plus/vip/mem/referee/page", { - data: { - storeId: o.stoid, - userId: r.user_id, - page: th.data.page, - pageSize: th.data.pageSize - } + data:r_data }).then(res => { - - th.setData({isDetailed:1}) + + setTimeout(function () { + th.setData({isDetailed: 1 }); + },300) if(res.data.code==0 && res.data.data.pageData && res.data.data.pageData.length>0) { th.data.page++;//当前页数+1 var arr1 = th.data.arrayDetailed;//获取明细数组 var arr2 = res.data.data.pageData;//获取当前查询数据 + if(!arr1) arr1=[]; + var arr3 = [...arr1, ...arr2];//把当前查询数组拼接到原本数组后面 var ismore = 0; if (arr3.length == res.data.data.total) ismore = 1 //数据已加载完判断 @@ -129,8 +149,9 @@ Page({ arrayDetailed: arr3, total: res.data.data.total, ismore: ismore, - isDetailed: 1 }) + + } }) @@ -152,7 +173,6 @@ Page({ * 页面上拉触底事件的处理函数 */ onReachBottom: function() { - if (this.data.total <= this.data.pageSize) return; if (this.data.ismore) { t.my_warnning("加载完啦!", 0, this); @@ -183,7 +203,7 @@ Page({ var privilege_o = th.data.privilege_o;//勋章图片 var img_square=th.data.img_square; var app = getApp(); - var user=app.globalData.userInfo; + var user=app.globalData.userInfo; var unit = th.data.screenWidth / 750 * 1.35; var scene = getApp().globalData.user_id; var nickname = user.nickname; @@ -368,10 +388,7 @@ Page({ },300) }) }) - - - - + } }) @@ -435,9 +452,66 @@ Page({ }) }, - - - - - + + + //起始时间 + bindDateChenge: function(e) { + var isBind = false; + this.setData({ + datet: e.detail.value, + isBind: isBind + }); + }, + // 结束时间 + bindDateChenges: function(e) { + var isBinds = false; + this.setData({ + dates: e.detail.value, + isBinds: isBinds + }); + }, + //catchtap阻止冒泡,点击清除开始时间的按钮 + eliminate: function() { + var isBind = true; + var data = ""; + this.setData({ + datet: data, + isBind: isBind + }) + }, + //catchtap阻止冒泡,点击清除结束时间的按钮 + eliminates: function() { + var isBinds = true; + var dates = ""; + this.setData({ + dates: dates, + isBinds: isBinds + }) + }, + + get_input:function (e) { + this.data.input_val=e.detail.value; + }, + + //点击的搜索事件 + get_search:function () { + var th=this; + + if(th.data.datet && th.data.dates){ + var oDate1 = new Date(th.data.datet); + var oDate2 = new Date(th.data.dates); + if(oDate2 +
+ + 日期: + + + + {{datet}} + + + + + + + + + {{dates}} + + + + + + + + 查询内容 + + + + + +
+ + diff --git a/pages/user/Detailed/Detailed.wxss b/pages/user/Detailed/Detailed.wxss index fec8d60..97a6d96 100644 --- a/pages/user/Detailed/Detailed.wxss +++ b/pages/user/Detailed/Detailed.wxss @@ -14,7 +14,6 @@ } - .phone { width: 250rpx; } @@ -59,4 +58,247 @@ height: 56rpx; background-color: rgb(255, 72, 72); border-radius: 40rpx; +} + + +.big-rim{ + margin-top: 15rpx; + width: 100%; + height: 305rpx; + border-bottom: 8px solid #EEEEEE; +} +/* 单据时间 */ +.time{ + + font-size: 25rpx; + color: #999999; + width: 100%; +} +.min-rim{ + display: flex; + width: 100%; + height: auto; + margin-left: 30rpx; +} +/* 日期 */ +.rq{ + height: 25rpx; + font-size: 28rpx; + margin-top:12rpx; + font-family:'SimHei',Arial; +} +/* 日期控件 */ +.pi{ + width:200rpx; + height:auto; + margin-left:10rpx; + +} +.pis{ + width:200rpx; + height:auto; + margin-left:30rpx; +} +/* 日期边框 */ +.rq-rim{ + position:relative; + left:0; + top:0 +} +/* 开始时间边框*/ +.kssj{ + display: inline-block; + height: 50rpx; + background-color: #EEEEEE; + border: 1px solid #DADADA; + width:200rpx; + border-radius: 3px; + line-height:40rpx; + position:relative; + top:0rpx; + left:0rpx; + +} +/* 开始时间的文字 */ +.wz{ + display: inline-block; + font-size: 25rpx; + color: #333; +} + +/* 开始清空按钮的 边框*/ +.qc-rim{ + position:absolute; + top:10rpx; + left:173rpx; + +} +/* 结束时间清空输入框的按钮的边框 */ +.end-rim{ + position: absolute; + top: 23rpx; + left:547rpx; + width: 25rpx; + height: 25rpx; +} +/* 查询内容 */ +.cxnr{ + margin-left:30rpx; + font-size:28rpx; + font-family: 'SimHei',Arial; +} +/* 至 */ +.zi{ + margin-top:14rpx; + font-weight:600; + font-size:28rpx; + font-family: 'SimHei',Arial; + margin-left:30rpx; +} +/* 结束时间 */ + +.jssj{ + padding-left: 10rpx; + margin-left: 30rpx; + padding-bottom: 10rpx; + height: 35rpx; + font-size: 25rpx; + color: #333; + background-color: #EEEEEE; + border: 1px solid #DADADA; + width:85%; + border-radius: 5px; + +} +/* 查询内容的备考的边框 */ +.xknr-rim{ + display: flex; + width: 100%; + height: 55rpx; + line-height:105rpx; + margin-top:20rpx; +} +/* 明细查询 */ +.botton{ + margin-left: 30rpx; + margin-top: 50rpx; + background-color: #C4182E; + width: 95%; + border-radius:10rpx; + text-align: center; + height: 70rpx; + line-height: 70rpx; + color: #FFF; + font-size: 29rpx; + border: none; + font-family: 'SimHei',Arial; +} + +/*开始时间清空输入框的按钮*/ +.empty{ + width: 25rpx; + height: 25rpx; + border-radius:50%; + background: #767676; + color: #fff; + font-size: 25rpx; + text-align: center; + line-height:19rpx; +} +/*结束时间清空输入框的按钮*/ +.end{ + width: 25rpx; + height: 25rpx; + border-radius:50%; + background: #767676; + color: #fff; + font-size: 25rpx; + text-align: center; + line-height:19rpx; +} + +/* 顶部 */ +.top{ + width: 170rpx; + height: 50rpx; + padding: 0 10rpx; + line-height: 50rpx; + font-size: 34rpx; + margin-top: 25rpx; + border-radius:3rpx; +} +.images{ + width:35rpx; + height:35rpx; + margin-left:-9rpx; + margin-top:6rpx; +} +.rim-images{ + width: 62rpx; + height: 46rpx; + line-height: 37rpx; + /* border-style: inset;padding:4rpx;text-align: center; */ + background: #f1f1f1; + border-color:#000000; + border-width: 1rpx; + transform:translateX(28%); + margin-top:-3rpx; + border-radius:5rpx; +} +/* 下拉框 */ +.top-selected{ + width: 100%; + display: flex; + align-items: center; + justify-content: space-between; + border: 1px solid #ccc; + padding: 0 10rpx; + font-size: 30rpx; + background:#eeeeee; + height:50rpx; + border-radius:6rpx; + +} +.texts{ + margin:0 auto; + font-size: 25rpx; +} + +/* 下拉内容 */ +.select-box { + background-color: #eeeeee; + width:190rpx; + position: relative; + z-index:1; + overflow: hidden; + text-align: left; + animation: myfirst 0.5s; + font-size: 25rpx; + border: 1px solid #DADADA; +} +.select_one { + padding-left: 20rpx; + width: 100%; + height: 60rpx; + line-height: 60rpx; +} +/* 注释 */ +.zs{ + margin-left: 30rpx; + font-size: 25rpx; + color: #999999; + font-family: 'SimHei',Arial; + margin-top: 42rpx; + margin-bottom: 30rpx; +} + +.input{ + width: 300rpx; + background-color: #EEEEEE; + border-radius: 10rpx; + font-size: 24rpx; + text-indent: 5rpx; + height: 56rpx; + border: 1rpx solid #ccc; + } \ No newline at end of file diff --git a/pages/user/coupons/exchange/exchange.js b/pages/user/coupons/exchange/exchange.js index d9164b7..2842e32 100644 --- a/pages/user/coupons/exchange/exchange.js +++ b/pages/user/coupons/exchange/exchange.js @@ -60,9 +60,17 @@ Page({ * 点击兑换 */ async click(e) { - var monye=e.currentTarget.dataset.monye; - var integr=e.currentTarget.dataset.integr; - //var integr = "-" + integr; + var th=this; + this.data.monye=e.currentTarget.dataset.monye; + this.data.integr=e.currentTarget.dataset.integr; + var my_con = this.selectComponent("#my_con"); //组件的id + var title="是否使用"+th.data.integr+"积分兑换代金券面值"+th.data.monye+"元"; + my_con.open(title, "确定", "取消", th.sure_pay, null) + }, + + sure_pay:function(){ + var monye=this.data.monye; + var integr=this.data.integr; var user_id = getApp().globalData.user_id; console.log(integr,"是什么微卷",typeof integr,monye); @@ -81,10 +89,11 @@ Page({ getApp().showWarning("积分不足"); } } - - }) + }) }, + + /** * 生命周期函数--监听页面显示 */ diff --git a/pages/user/coupons/exchange/exchange.json b/pages/user/coupons/exchange/exchange.json index 8835af0..cc141cd 100644 --- a/pages/user/coupons/exchange/exchange.json +++ b/pages/user/coupons/exchange/exchange.json @@ -1,3 +1,5 @@ { - "usingComponents": {} + "usingComponents": { + "my_confirm": "/components/my_confirm/my_confirm" + } } \ No newline at end of file diff --git a/pages/user/coupons/exchange/exchange.wxml b/pages/user/coupons/exchange/exchange.wxml index a7b7f7c..17abd3a 100644 --- a/pages/user/coupons/exchange/exchange.wxml +++ b/pages/user/coupons/exchange/exchange.wxml @@ -8,4 +8,5 @@ {{result.Integral}}积分兑换{{filter.getNum(result.ToSum)}}元微券 立即兑换 - \ No newline at end of file + + \ No newline at end of file diff --git a/pages/user/userinfo/userinfo.js b/pages/user/userinfo/userinfo.js index f6b0e5a..47ea48c 100644 --- a/pages/user/userinfo/userinfo.js +++ b/pages/user/userinfo/userinfo.js @@ -812,7 +812,7 @@ Page({ } var identity_card = th.data.identity_card; //身份证 - if (identity_card != "" && !(/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(identity_card))) { + if (identity_card!=null && identity_card!=undefined && identity_card != "" && !(/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(identity_card))) { getApp().my_warnning("身份证号码错误", 0, th); return false; } diff --git a/pages/user/userqy/userqy.js b/pages/user/userqy/userqy.js index f44aee0..9927f1d 100644 --- a/pages/user/userqy/userqy.js +++ b/pages/user/userqy/userqy.js @@ -27,6 +27,7 @@ Page({ is_full:0, //是否满级 cur_g_num:0,//当前级需要多少钱 + userqy_color:null,//颜色值 }, swiperChange: function (e) { @@ -57,6 +58,14 @@ Page({ var gl_data=getApp().globalData; var sw_cur_id=0; var th=this; + //颜色值 + getApp().getConfig2(function(e) { + var getuserqy_color=e.userqy_color; + if (getuserqy_color) getuserqy_color = JSON.parse(getuserqy_color) + if(getuserqy_color){ + th.setData({userqy_color:getuserqy_color}) + } + }) //获取成长值 await getApp().request.promiseGet("/api/weshop/users/grade/aftervipinfo/get",{ data:{ storeId:os.stoid,userId:gl_data.user_id } diff --git a/pages/user/userqy/userqy.wxml b/pages/user/userqy/userqy.wxml index 78ca589..28f1f24 100644 --- a/pages/user/userqy/userqy.wxml +++ b/pages/user/userqy/userqy.wxml @@ -2,22 +2,22 @@ - + - + {{userinfo.nickname}} {{GradeName}} - 成长值 - - - + 成长值 + + + - {{filter.pInt(cz_val)}} / {{need_money}} - {{filter.pInt(cz_val)}} + {{filter.pInt(cz_val)}} / {{need_money}} + {{filter.pInt(cz_val)}} diff --git a/pages/user/userqy/userqy.wxss b/pages/user/userqy/userqy.wxss index ac250b8..9e039aa 100644 --- a/pages/user/userqy/userqy.wxss +++ b/pages/user/userqy/userqy.wxss @@ -9,7 +9,13 @@ } .xc-userqy-frame .user-frame .arc{ width: 750rpx; - height: 444rpx; + height: 444rpx; + left: -20%; + top: 0; + z-index: -1; + content: ''; + border-radius: 0 0 20% 20%; + background: #ff7295; } .xc-userqy-frame .user-frame .user-img{ diff --git a/utils/request.js b/utils/request.js index 5eec6d7..c4b0bae 100644 --- a/utils/request.js +++ b/utils/request.js @@ -191,13 +191,19 @@ module.exports = { promisePost:function(url,data){ var th=this; if(url.indexOf("http")==-1) url=getApp().globalData.setting.url +url; + var post_data=data.data; + var header={"content-type": "application/x-www-form-urlencoded" }; + if(data.is_json){ + header={ 'content-type': 'application/json'}; + post_data=JSON.stringify(post_data); + } return new Promise((resolve, reject) => { data.isShowLoading && th.showLoading(); wx.request({ url, method: 'POST', - header: {"content-type": "application/x-www-form-urlencoded" }, - data:data.data, + header: header, + data:post_data, success(res) { data.isShowLoading && th.hideLoading(); resolve(res);