diff --git a/app.wxss b/app.wxss index 0d85c34..bc3fcd2 100644 --- a/app.wxss +++ b/app.wxss @@ -1207,6 +1207,9 @@ background: #ffe3e2; content: "\e615"; } +.icon-search_fd:before { + content: "\e618"; +} /* 去掉零售价划线 */ .no_line_x{ diff --git a/components/diy_notice/diy_notice.wxml b/components/diy_notice/diy_notice.wxml index 2f45c6f..71ae8fb 100644 --- a/components/diy_notice/diy_notice.wxml +++ b/components/diy_notice/diy_notice.wxml @@ -3,8 +3,8 @@ - - + + {{object.noticetxt}} {{object.noticetxt}} @@ -18,8 +18,8 @@ - - + + {{object.noticetxt}} {{object.noticetxt}} @@ -35,8 +35,8 @@ - - + + {{object.noticetxt}} {{object.noticetxt}} @@ -49,8 +49,8 @@ - - + + {{object.noticetxt}} {{object.noticetxt}} diff --git a/components/diy_searchbox/diy_searchbox.js b/components/diy_searchbox/diy_searchbox.js index 73443ef..32b86db 100644 --- a/components/diy_searchbox/diy_searchbox.js +++ b/components/diy_searchbox/diy_searchbox.js @@ -9,6 +9,14 @@ Component({ type: Object, value: null, }, + transparent: { + type: Number, + value: 0, + }, + nav_backgroundColor: { + type: String, + value: '', + }, }, data: { // 这里是一些组件内部数据 diff --git a/components/diy_searchbox/diy_searchbox.wxml b/components/diy_searchbox/diy_searchbox.wxml index 2fe1238..937cdf5 100644 --- a/components/diy_searchbox/diy_searchbox.wxml +++ b/components/diy_searchbox/diy_searchbox.wxml @@ -1,12 +1,13 @@ - + - - - + + + - 请输入商品关键字 + {{object.searchbox_text}} + 请输入商品关键字 @@ -19,7 +20,7 @@ {{item}} - + 清除 @@ -32,14 +33,16 @@ - - + + + - - + + - 请输入商品关键字 + {{object.searchbox_text}} + 请输入商品关键字 @@ -63,7 +66,8 @@ - + + diff --git a/components/diy_searchbox/diy_searchbox.wxss b/components/diy_searchbox/diy_searchbox.wxss index 9c87092..3d05b81 100644 --- a/components/diy_searchbox/diy_searchbox.wxss +++ b/components/diy_searchbox/diy_searchbox.wxss @@ -7,7 +7,7 @@ } .s_ge{ - width: 700rpx; + /* width: 700rpx; */ height: 70rpx; text-align: center; border-radius: 8rpx; @@ -15,6 +15,7 @@ background: #fff none repeat scroll 0 0; border: 2px solid #eee; line-height: 64rpx; + padding: 0 10rpx; } .s_ge image{ @@ -153,7 +154,9 @@ color: #FF5B5A; font-size: 26rpx; } - +.is_bord{ + border-radius: 30rpx !important; +} /* .w100 { width: 100%; box-sizing: border-box; diff --git a/packageA/pages/jfbuy/jfbuy.js b/packageA/pages/jfbuy/jfbuy.js index 853f808..2cb85d2 100644 --- a/packageA/pages/jfbuy/jfbuy.js +++ b/packageA/pages/jfbuy/jfbuy.js @@ -35,6 +35,7 @@ Page({ key_str:'', pattern:0, //分成的方式 pageSize:10, + curr:10, currentPage:1, //当前的页码 // canvasHidden: 1, //-- 隐藏画布 -- @@ -57,8 +58,12 @@ Page({ triggered: false, isPullDownRefresh: false, - - + + //-- 和搜索框相关的 -- + search_ing:0, + hiddenClear:1, + focus:false, + keyword:'' }, /** @@ -345,6 +350,16 @@ Page({ } else { data.stypeup = 1; }; + + var word=this.data.keyword; + + //如果没有关闭搜索的话,就看不清理keyword + if(!this.data.keyword && this.data.search_ing){ + if(this.data.requestData && this.data.requestData.keyword){ + word=this.data.requestData.keyword; + } + } + data.keyword=word // this.data.requestData = data; this.setData({ @@ -353,9 +368,44 @@ Page({ this.request_list(data); }, - - + sear_list(){ + var th=this; + var psize=th.data.curr; + + this.setData({ + is_no_data2:0, + is_no_more2:0, + list2:[], + is_load2: 0, + currentPage2:1, + pageSize:psize + }); + + var data = { + store_id:oo.stoid, + stype: this.data.requestData.stype, + stypeup:1, + page:1, + pageSize:psize + }; + + if(this.data.isUp) { + data.stypeup = 0; + } else { + data.stypeup = 1; + }; + + data.keyword=this.data.keyword + + // this.data.requestData = data; + this.setData({ + requestData: data + }) + + this.request_list(data); + }, + request_list: function(data, callback){ // console.log('触发上拉刷新'); @@ -421,9 +471,6 @@ Page({ this.request_list(data); }, - - - //---图片失败,默认图片--- bind_bnerr2: function (e) { @@ -491,6 +538,52 @@ Page({ var viewHeight = this.data.clientWidth / ratio; var con_heihgt=this.data.clientHeight-viewHeight; this.setData({con_heihgt:con_heihgt,isshow:1}) - + }, + + + /*-- 和搜索相关 --*/ + show_search(){ + this.setData({ + search_ing:1, + hiddenClear:1, + keyword:'', + focus:true + }) + }, + + getInput(e) { + let val = e.detail.value; + if (val) { + this.setData({ + keyword: e.detail.value, + hiddenClear: false, + }); + } else { + this.setData({ + hiddenClear: true, + }); + } + }, + + clearInput() { + this.setData({ + keyword: '', + hiddenClear: true, + }); + }, + + close_layer:function (){ + this.setData({ + search_ing:0, + hiddenClear:1, + keyword:'', + }) + this.sear_list(); + }, + + //开始搜索 + submitSearch(){ + this.sear_list(); } + }) \ No newline at end of file diff --git a/packageA/pages/jfbuy/jfbuy.wxml b/packageA/pages/jfbuy/jfbuy.wxml index 74a3acb..ff7e727 100644 --- a/packageA/pages/jfbuy/jfbuy.wxml +++ b/packageA/pages/jfbuy/jfbuy.wxml @@ -23,6 +23,22 @@ {{item}} + + + + + + + + + + + + + + + @@ -69,3 +85,4 @@ + diff --git a/packageA/pages/jfbuy/jfbuy.wxss b/packageA/pages/jfbuy/jfbuy.wxss index e30a18b..6e46adf 100644 --- a/packageA/pages/jfbuy/jfbuy.wxss +++ b/packageA/pages/jfbuy/jfbuy.wxss @@ -63,6 +63,7 @@ page { width: 100%; top: 0; z-index: 3; + align-items: center; } .title .iconfont { color: #ccc; @@ -429,4 +430,55 @@ radio .wx-radio-input.wx-radio-input-checked::before{ margin-left:25rpx; margin-right:25rpx; margin-top: 30rpx; -} \ No newline at end of file +} + + +/*-- 搜索相关 --*/ +.s_box{ background-color: #fff; width: 100%; } +.input-box { + position: relative; + flex: 1; + padding-left: 50rpx; + padding-right: 70rpx; + background-color: #f0f0f0; + border-radius: 60rpx; +} + +.input-box::before { + font-family: iconfont; + position: absolute; + left: 20rpx; + top: 50%; + transform: translateY(-50%); + content: '\e618'; + color: #666; +} + +.input-search { + position: relative; + padding: 10rpx; + font-size: 28rpx; +} + + +.btn { + margin-left: 0; + margin-right: 0; + line-height: 1; + padding: 20rpx; + font-size: 30rpx; +} + +.btn::after { + border: none; +} +.icon-guan { + font-size: 20rpx; + padding: 10rpx; + position: absolute; + right: 20rpx; + top: 50%; + transform: translateY(-50%); +} + + diff --git a/packageD/pages/user/coupons/coupons.wxml b/packageD/pages/user/coupons/coupons.wxml index ce8691e..cdfc393 100644 --- a/packageD/pages/user/coupons/coupons.wxml +++ b/packageD/pages/user/coupons/coupons.wxml @@ -46,7 +46,8 @@ - {{filter.getNum(detail.Sum)}}元微券 + {{detail.ActName}} + {{filter.getNum(detail.Sum)}}元微券 微券来源: {{detail.SendMan==null?'线下发放':detail.SendMan==''?"线下发放":detail.SendMan}} @@ -117,8 +118,9 @@ 包邮券 + {{details[useIndex].ActName}} - {{filter.getNum(details[useIndex].Sum)}}元微券 + {{filter.getNum(details[useIndex].Sum)}}元微券 diff --git a/packageE/pages/cart/cart2/cart2.js b/packageE/pages/cart/cart2/cart2.js index 40fe8dd..5b41f03 100644 --- a/packageE/pages/cart/cart2/cart2.js +++ b/packageE/pages/cart/cart2/cart2.js @@ -5082,7 +5082,7 @@ Page({ } //如果不立即购买或者秒杀,如果是线下库存购买的时候 - if ([0,3,5,7,10].indexOf(goods.prom_type)>-1 && th.data.sales_rules >= 2 && !g_item.whsle_id && !getApp().is_virtual(g_item) ) { + if (!goods.is_gift && [0,3,5,7,10].indexOf(goods.prom_type)>-1 && th.data.sales_rules >= 2 && !g_item.whsle_id && !getApp().is_virtual(g_item) ) { var isok = 1; await th.check_store_num(goods.goods_id, t_item.pickup_id, goods.goods_num, function (res) { isok = res; diff --git a/packageE/pages/user/cardinfo/cardinfo.js b/packageE/pages/user/cardinfo/cardinfo.js index 46534e3..6c2759b 100644 --- a/packageE/pages/user/cardinfo/cardinfo.js +++ b/packageE/pages/user/cardinfo/cardinfo.js @@ -65,11 +65,14 @@ Page({ //-----------等级卡说明------------------- getApp().request.promiseGet("/api/weshop/storeconfig/get/" + os.stoid, { }).then(res => { - var is_cardrule = res.data.data.cardrules; - w.wxParse("content", "html", ut.format_content(is_cardrule), ee, 6); - ee.setData({ - is_card_rule: is_cardrule - }); + var is_cardrule = res.data.data.cardrules; + var switch_list = res.data.data.switch_list; + var swi_arr = JSON.parse(switch_list); + w.wxParse("content", "html", ut.format_content(is_cardrule), ee, 6); + ee.setData({ + is_card_rule: is_cardrule, + plus_bg_color: swi_arr.plus_bg_color, + }); }) //----------------------------获取最大的卡类----------------------- diff --git a/packageE/pages/user/cardinfo/cardinfo.wxml b/packageE/pages/user/cardinfo/cardinfo.wxml index 5858514..40a73ee 100644 --- a/packageE/pages/user/cardinfo/cardinfo.wxml +++ b/packageE/pages/user/cardinfo/cardinfo.wxml @@ -4,9 +4,13 @@ - - - + + + + + + + diff --git a/packageE/pages/user/cardinfo/cardinfo.wxss b/packageE/pages/user/cardinfo/cardinfo.wxss index 64ee734..1b1ce7f 100644 --- a/packageE/pages/user/cardinfo/cardinfo.wxss +++ b/packageE/pages/user/cardinfo/cardinfo.wxss @@ -220,7 +220,7 @@ align-items:center; .fs36{ font-size: 36rpx; } -.Opening_bk image { +.Opening_bk{ position: absolute; width: 100%; @@ -238,4 +238,24 @@ align-items:center; border-top-left-radius: 55rpx; border-bottom-left-radius:55rpx; } .content .card_list .list .card_name{ max-width: 230rpx} - .price_show .thr{color: #999; text-decoration:line-through } \ No newline at end of file + .price_show .thr{color: #999; text-decoration:line-through } + + + /* 定义矩形 */ + .rect { + width: 100%; + height: 300rpx; + position: relative; /* 要设置位置是因为要设置扇形遮罩的位置 */ + overflow: hidden; + } + + /* 定义扇形遮罩 */ + .rect .before { + width: 140%; + height: 300rpx; + background-color: #f0ba94; + position: absolute; /* 要用绝对定位 */ + left: -20%; + top: -2rpx; + border-radius: 0 0 50% 50%; /* 只要顶部两个角是圆弧就好了 */ + } \ No newline at end of file diff --git a/pages/index/index/index.wxml b/pages/index/index/index.wxml index 0da07e7..4362431 100644 --- a/pages/index/index/index.wxml +++ b/pages/index/index/index.wxml @@ -435,7 +435,8 @@ - + + diff --git a/pages/user/plus/plus.js b/pages/user/plus/plus.js index 6a33261..2618634 100644 --- a/pages/user/plus/plus.js +++ b/pages/user/plus/plus.js @@ -111,7 +111,8 @@ Page({ that.setData({ is_card_rule: is_cardrule, isyaoqingma: parseInt(swi_arr.isyaoqingma), - is_salesman: parseInt(swi_arr.is_staffno) + is_salesman: parseInt(swi_arr.is_staffno), + plus_bg_color: swi_arr.plus_bg_color, }); } }); diff --git a/pages/user/plus/plus.wxml b/pages/user/plus/plus.wxml index afaf81c..ffafa5a 100644 --- a/pages/user/plus/plus.wxml +++ b/pages/user/plus/plus.wxml @@ -10,7 +10,10 @@ - + + + + diff --git a/pages/user/plus/plus.wxss b/pages/user/plus/plus.wxss index e6912d3..dcca6ec 100644 --- a/pages/user/plus/plus.wxss +++ b/pages/user/plus/plus.wxss @@ -58,7 +58,7 @@ page { width: 50%; text-align: center; } -.Opening_bk image { +.Opening_bk{ position: absolute; z-index: 2; width: 100%; @@ -404,4 +404,23 @@ margin-top: 10rpx; swiper-item{ overflow: visible; +} + +/* 定义矩形 */ +.rect { + width: 100%; + height: 300rpx; + position: relative; /* 要设置位置是因为要设置扇形遮罩的位置 */ + overflow: hidden; +} + +/* 定义扇形遮罩 */ +.rect .before { + width: 140%; + height: 300rpx; + background-color: #f0ba94; + position: absolute; /* 要用绝对定位 */ + left: -20%; + top: -2rpx; + border-radius: 0 0 50% 50%; /* 只要顶部两个角是圆弧就好了 */ } \ No newline at end of file diff --git a/utils/pay.js b/utils/pay.js index c9dc1e4..c27cf29 100644 --- a/utils/pay.js +++ b/utils/pay.js @@ -49,7 +49,6 @@ module.exports = { wx.hideLoading(); if(t.data.code==0){ - var is_pos_pay=t.data.data.is_pos_pay; //-- 富有的插件支付 -- if(t.data.data.is_fuioupay){ @@ -93,6 +92,67 @@ module.exports = { var p_data=t.data.data; delete p_data.is_pos_pay; //清理掉,不然签名不通过 + + var err_txt=""; + + if(!p_data.acct && !err_txt){ + err_txt="未找到acct"; + } + if(!p_data.appid && !err_txt){ + err_txt="未找到appid"; + } + if(!p_data.cusid && !err_txt){ + err_txt="未找到cusid"; + } + if(!p_data.notify_url && !err_txt){ + err_txt="未找到notify_url"; + } + if(!p_data.orgid && !err_txt){ + err_txt="未找到orgid"; + } + if(!p_data.paytype && !err_txt){ + err_txt="未找到paytype"; + } + if(!p_data.randomstr && !err_txt){ + err_txt="未找到randomstr"; + } + if(!p_data.remark && !err_txt){ + err_txt="未找到remark"; + } + if(!p_data.reqsn && !err_txt){ + err_txt="未找到reqsn"; + } + if(!p_data.sign && !err_txt){ + err_txt="未找到sign"; + } + if(!p_data.signtype && !err_txt){ + err_txt="未找到signtype"; + } + if(!p_data.trxamt && !err_txt){ + err_txt="未找到trxamt"; + } + if(!p_data.validtime && !err_txt){ + err_txt="未找到validtime"; + } + if(!p_data.version && !err_txt){ + err_txt="未找到version"; + } + + if(err_txt){ + i.wx_paying=0; + getApp().confirmBox(err_txt); + setTimeout(function(){ + wx.redirectTo({ + url: "/pages/user/order_list/order_list", + }); + },1000) + return false; + } + + + + + wx.openEmbeddedMiniProgram({ appId: 'wxef277996acc166c3', extraData: p_data,