diff --git a/app.json b/app.json index bacfe0c..ed7b276 100644 --- a/app.json +++ b/app.json @@ -31,16 +31,9 @@ "pages/team/team_ping/team_ping", "pages/cart/cart2_pt/cart2_pt", "pages/cart/cart_wk/cart_wk", - "pages/user/member/menber", - "pages/user/member/bring/bring", - "pages/user/member/bring/msg/msg", - "pages/user/member/account/account", - "pages/user/member/account_unable/account_unable", - "pages/user/member/cash_record/cash_record", - "pages/user/coupons/coupons", - "pages/user/integral/integral", - "pages/user/integral/query/index", - "pages/user/integral/msg/msg", + + + "pages/user/userqy/userqy", "pages/user/user_spsy/user_spsy", "pages/user/user_fw/user_fw", @@ -74,9 +67,7 @@ "pages/cart/cart2_inte/cart2_inte", "pages/giftpack/festival/festival", "pages/team/team_more/team_more", - "pages/user/deposit/deposit", - "pages/user/deposit/prepaid/msg/msg", - "pages/user/deposit/prepaid/prepaid", + "pages/distribution/distribution", "pages/template/index" ], @@ -189,7 +180,21 @@ "pages/AI-test-skin/select_photo/select_photo", "pages/AI-test-skin/fail_result/fail_result", "pages/AI-test-skin/success_result/success_result", - "pages/AI-test-skin/analyse/analyse" + "pages/AI-test-skin/analyse/analyse", + + "pages/user/coupons/coupons", + "pages/user/integral/integral", + "pages/user/integral/query/index", + "pages/user/integral/msg/msg", + "pages/user/deposit/deposit", + "pages/user/deposit/prepaid/msg/msg", + "pages/user/deposit/prepaid/prepaid", + "pages/user/member/menber", + "pages/user/member/bring/bring", + "pages/user/member/bring/msg/msg", + "pages/user/member/account/account", + "pages/user/member/account_unable/account_unable", + "pages/user/member/cash_record/cash_record" ] } diff --git a/packageA/pages/checkin/checkin.wxml b/packageA/pages/checkin/checkin.wxml index 82cc42f..4f8bb65 100644 --- a/packageA/pages/checkin/checkin.wxml +++ b/packageA/pages/checkin/checkin.wxml @@ -4,7 +4,7 @@ 规则 - + 我的积分 diff --git a/packageA/pages/quan_list/quan_list.js b/packageA/pages/quan_list/quan_list.js index b630ced..f76fea9 100644 --- a/packageA/pages/quan_list/quan_list.js +++ b/packageA/pages/quan_list/quan_list.js @@ -185,6 +185,4 @@ Page({ var item = this.data.dataList[index]; getApp().goto("/packageA/pages/quan_pro/quan_pro?id=" + item.id); } - - }); diff --git a/packageA/pages/quan_pro/quan_pro.js b/packageA/pages/quan_pro/quan_pro.js index 08981c6..b5650c2 100644 --- a/packageA/pages/quan_pro/quan_pro.js +++ b/packageA/pages/quan_pro/quan_pro.js @@ -132,7 +132,7 @@ Page({ this.setData({ show_success:0 }) - getApp().goto("/pages/user/coupons/coupons"); + getApp().goto("/packageD/pages/user/coupons/coupons"); }, close_show(){ diff --git a/packageB/pages/luckactivity/luckinfo/luckinfo.js b/packageB/pages/luckactivity/luckinfo/luckinfo.js index f9370d2..33feeae 100644 --- a/packageB/pages/luckactivity/luckinfo/luckinfo.js +++ b/packageB/pages/luckactivity/luckinfo/luckinfo.js @@ -1279,7 +1279,7 @@ Page({ }; switch(type) { case 1: { - url = '/pages/user/integral/integral'; + url = '/packageD/pages/user/integral/integral'; break; }; case 2: { @@ -1287,7 +1287,7 @@ Page({ break; }; case 3: { - url = '/pages/user/coupons/coupons'; + url = '/packageD/pages/user/coupons/coupons'; break; }; case 4: { diff --git a/pages/distribution/distribution.wxml b/pages/distribution/distribution.wxml index 1372fc9..7a53c29 100644 --- a/pages/distribution/distribution.wxml +++ b/pages/distribution/distribution.wxml @@ -14,7 +14,7 @@ 可提现金额 - {{filter.show_default(data.liudong_money)}} + {{filter.show_default(data.liudong_money)}} diff --git a/pages/giftpack/buygiftpack/giftpackbuy.js b/pages/giftpack/buygiftpack/giftpackbuy.js index 54eeb67..18e779f 100644 --- a/pages/giftpack/buygiftpack/giftpackbuy.js +++ b/pages/giftpack/buygiftpack/giftpackbuy.js @@ -1,4 +1,5 @@ var i = require("../../../utils/util.js"); +var com = require("../public/buy_com.js"); var e = getApp(), a = e.globalData.setting, os = a, @@ -27,6 +28,44 @@ Page({ total: 0, //总数量 ad_data: null, first_leader: e.globalData.first_leader || 0, // 推荐人ID + + //门店相关 + ismend: 0, + is_sec_mend: 0, + sto_sele_name: "", //选中的门店名称 + sto_sele_id: "", //选中的门店id + sto_sele_distr: "", //选择的门店的配送方式 + is_show_sto_cat: 1, //是否显示门店分类 + only_pk: null, + all_sto: null, + sec_sto: null, //选择了的门店分类 + pickpu_list: null, //读出的所有门店list + def_pickpu_list: null, //一开始5个门店list + sec_pick_index: 0, //第二级门店选择ID + fir_pick_index: 0, //第一级门店选择ID + all_pick_list: null,//所有的门店先记录起来 + + select_store: 0, //选择更多 + index: 1, + more_store: 0, //选择门店 + sort_store: 0, //门店分类 + choice_sort_store: 0, //选择分类门店 + new_user: 0, //新用户 + + def_pick_store: null, // 默认的门店 + fir_def_store: null, //客户默认的门店的 + lat: null, //维度 + lon: null, //经度 + + is_get_local_ok: 0, //获取坐标是否完成 + region_name: "门店分类", //区域的名字 + is_gps: 1, + open_ind_store: 0, //哪里打开的门店列表的控制属性 + default_store: {}, //创建添加默认门店地址的对象 + + store:0, + openSpecModal:0 + }, onLoad: function (options) { this.setData({ @@ -80,6 +119,7 @@ Page({ }, onShow: function () { getApp().check_can_share(); + var th=this; //--先判断会员状态-- getApp().is_Single_page(this, function () { var user_info = getApp().globalData.userInfo; @@ -87,170 +127,112 @@ Page({ getApp().goto('/pages/togoin/togoin'); return false; } + com.wait_for_store_config(th); + com.set_user_mo_store(th,os); + }) this.init(); }, //购买礼包 GetBuyPrice: function (e) { - var that = this.data; - var th = this; - var id = e.currentTarget.dataset.id; //活动id - var my_confirm = th.selectComponent("#my_confirm"); //组件的id - var order_sn = e.currentTarget.dataset.order_sn; //订单号 - var money = e.currentTarget.dataset.money; //支付金额 - my_confirm.open( - "是否确定购买该礼包", - "取消", - "确定", - function () { - my_confirm.open_cancel(0); - }, - function () { - my_confirm.open_cancel(0); - var json = { - "actId": '', //活动Id - "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 - "buyType": '2', //1=积分兑换 2=余额购买 - "giftBagId": id, //礼包Id - "storeId": that.getStorageID, //商家Id - "userId": that.getUserID, //用户ID - "buyFrom": 2, - "first_leader": that.first_leader, - }; - //-- 分享导购要记录 -- - if (getApp().globalData.guide_id) { - json.guide_id = getApp().globalData.guide_id; + var th = this; + var index = e.currentTarget.dataset.index; //活动id + var sele_g=th.data.wareCard[index]; + th.setData({sele_g:sele_g,buyType:2,}) + if(sele_g.is_pickup){ + if(sele_g.pickup_list && th.data.def_pick_store){ + com.check_def_pk(th); } - - var data = JSON.stringify(json); - var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert"; - getApp().request.json_post(url, json, - function (res) { - if (res.data.code == 0 && res.data.data) { - var order_sn = res.data.data.orderSn; - res = res.data.data.result; - if (!res) return false; - var url = "/pages/giftpack/payment/payment?money=" + money + "&order_sn=" + order_sn; - wx.requestPayment({ - timeStamp: String(res.timeStamp), - nonceStr: res.nonceStr, - package: res.packageValue, - signType: res.signType, - paySign: res.paySign, - success: function (res) { - getApp().goto(url); - }, - fail: function (res) { - getApp().my_warnning("取消支付", 0, th); - } - }); - } else { - getApp().my_warnning(res.data.msg, 0, th); + com.get_sto(th,os) + th.setData({ + openSpecModal:1 + }) + }else{ + var my_confirm = th.selectComponent("#my_confirm"); //组件的id + my_confirm.open( + "是否确定购买该礼包", + "取消", + "确定", + function () { + my_confirm.open_cancel(0); + }, + function () { + my_confirm.open_cancel(0); + com.buy_libao(th) } - }, - function (res) { - - } ) + } - } - ) }, // 积分兑换 GetBuyIntegral: function (e) { - var that = this.data; - var th = this; - var id = e.currentTarget.dataset.id; //活动id - var my_confirm = th.selectComponent("#my_confirm"); //组件的id - - my_confirm.open( - "是否确定兑换该礼包", - "取消", - "确定", - function () { - my_confirm.open_cancel(0); - }, - function () { - my_confirm.open_cancel(0); - var json = { - "actId": '', //活动Id - "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 - "buyType": '1', //1=积分兑换 2=余额购买 3=免费领取 - "giftBagId": id, //礼包Id - "storeId": that.getStorageID, //商家Id - "userId": that.getUserID, //用户ID - "buyFrom": 2, - "first_leader": that.first_leader - }; - - //-- 分享导购要记录 -- - if (getApp().globalData.guide_id) { - json.guide_id = getApp().globalData.guide_id; - } - console.log(json, 'json'); - var data = JSON.stringify(json); - var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert"; - getApp().request.json_post(url, json, - function (res) { - if (res.data.code == 0) { - getApp().my_warnning("兑换成功!", 1, th); - } else { - getApp().my_warnning(res.data.msg, 0, th); - } - }, - function (res) { }) - - }) + var th = this; + var index = e.currentTarget.dataset.index; //活动id + var sele_g=th.data.wareCard[index]; + th.setData({sele_g:sele_g, buyType:1,}) + if(sele_g.is_pickup){ + if(sele_g.pickup_list && th.data.def_pick_store){ + com.check_def_pk(th); + } + com.get_sto(th,os) + th.setData({ + openSpecModal:1 + }) + }else { + var my_confirm = th.selectComponent("#my_confirm"); //组件的id + my_confirm.open( + "是否确定兑换该礼包", + "取消", + "确定", + function () { + my_confirm.open_cancel(0); + }, + function () { + my_confirm.open_cancel(0); + com.buy_libao(th) + }) + } }, //免费领取 GetFree: function (e) { - var that = this.data; - var th = this; - var id = e.currentTarget.dataset.id; //活动id - var my_confirm = th.selectComponent("#my_confirm"); //组件的id - my_confirm.open( - "是否确定领取该礼包", - "取消", - "确定", - function () { - my_confirm.open_cancel(0); - }, - function () { - my_confirm.open_cancel(0); - var json = { - "actId": '', //活动Id - "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 - "buyType": '3', //1=积分兑换 2=余额购买 3=免费领取 - "giftBagId": id, //礼包Id - "storeId": that.getStorageID, //商家Id - "userId": that.getUserID, //用户ID - "buyFrom": 2, - "first_leader": that.first_leader - }; - //-- 分享导购要记录 -- - if (getApp().globalData.guide_id) { - json.guide_id = getApp().globalData.guide_id; - } - var data = JSON.stringify(json); - var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert"; - getApp().request.json_post(url, json, - function (res) { - if (res.data.code == 0) { - getApp().my_warnning("领取成功!", 1, th); - } else { - getApp().my_warnning(res.data.msg, 0, th); - } - }, - function (res) { }) - }) + + var th = this; + var index = e.currentTarget.dataset.index; //活动id + var sele_g=th.data.wareCard[index]; + th.setData({sele_g:sele_g, buyType:3,}) + + if(sele_g.is_pickup){ + if(sele_g.pickup_list && th.data.def_pick_store){ + com.check_def_pk(th); + } + com.get_sto(th,os) + th.setData({ + openSpecModal:1 + }) + }else { + + + var my_confirm = th.selectComponent("#my_confirm"); //组件的id + my_confirm.open( + "是否确定领取该礼包", + "取消", + "确定", + function () { + my_confirm.open_cancel(0); + }, + function () { + my_confirm.open_cancel(0); + com.buy_libao(th) + }) + } }, getList: function (e) { @@ -327,6 +309,7 @@ Page({ }, onShareAppMessage: function (e) { + getApp().globalData.no_clear=1; var curPage = this; var pagePath = curPage.route; //当前页面url if (pagePath.indexOf('/') != 0) { @@ -341,6 +324,7 @@ Page({ // 分享朋友圈 onShareTimeline() { + getApp().globalData.no_clear=1; var curPage = this; var pagePath = curPage.route; //当前页面url if (pagePath.indexOf('/') != 0) { @@ -354,4 +338,271 @@ Page({ } }, + + //--- 设置一下默认库存的数量 ---- + set_def_storage(ee) { + var that = this, th = this; + that.data.fir_def_store = ee; + that.setData({ + def_pick_store: ee, + sto_sele_name: ee.pickup_name, + sto_sele_id: ee.pickup_id, + sto_sele_distr: ee.distr_type + }) + }, + // 选择门店 + choice_store: function (ee) { + var th = this; + var ind = ee.currentTarget.dataset.ind; + var bconfig = th.data.bconfig; + + if (!th.data.only_pk && !th.data.def_pickpu_list) { + getApp().confirmBox("门店库存不足", null, 25000, !1); + return false; + } + + if (th.data.only_pk && !th.data.only_pk.length) { + getApp().confirmBox("门店库存不足", null, 25000, !1); + return false; + } + if (th.data.def_pickpu_list && !th.data.def_pickpu_list.length) { + getApp().confirmBox("门店库存不足", null, 25000, !1); + return false; + } + + + if (bconfig && bconfig.is_sort_storage) { + wx.getLocation({ + type: 'gcj02', + success: function (res) { + + th.data.lat = res.latitude; + th.data.lon = res.longitude; + th.data.is_get_local_ok = 1; + th.setData({ + is_gps: 1 + }); + //th.onShow(); + com.get_sto(th,os); + }, + fail: function (res) { + //th.onShow(); + th.data.is_get_local_ok = 1; + com.get_sto(th,os); + if (res.errCode == 2) { + th.setData({ + is_gps: 0 + }); + if (th.data.is_gps == 0) { + getApp().confirmBox("请开启GPS定位", null, 25000, !1); + } + } else { + th.setData({ + is_gps: "3" + }); + } + + } + }) + } else { + th.data.is_get_local_ok = 1; + com.get_sto(th,os); + } + + if (ind != undefined && ind != null) { + this.setData({ + open_ind_store: ind, + store: 1, + openSpecModal: !1, + openSpecModal_pt: !1, + openSpecModal_flash_normal: !1, + }) + } else { + this.setData({ + store: 1, + openSpecModal: !1, + openSpecModal_pt: !1, + openSpecModal_flash_normal: !1 + + }) + } + }, + //关闭选择门店 + close_popup: function (e) { + var th = this; + this.setData({ + store: 0, + choice_sort_store: 0, + sort_store: 0, + fir_pick_index: 0, + sec_pick_index: 0 + }) + + var openindstore = this.data.open_ind_store; + if (openindstore == 1) { + th.setData({ + openSpecModal: !0, + openSpecModal_ind: openindstore, + }); + } else if (openindstore == 2) { + th.setData({ + openSpecModal: !0, + openSpecModal_ind: openindstore, + }); + } + else if (openindstore == 4) { //4就是拼团 + th.setData({ + openSpecModal_pt: 1, //打开拼团购买界面 + store: 0, //关闭门店 + choice_sort_store: 0, //关闭门店2级 + sort_store: 0, //关闭门店2级 + }); + } + else { + th.setData({ + store: 0, + choice_sort_store: 0, + sort_store: 0 + }) + } + + + }, + + //选择更多门店 + more_store: function () { + this.setData({ + sort_store: 1 + }); + }, + // 返回按钮 + returns: function () { + this.setData({ + sort_store: 0, + choice_sort_store: 0 + }); + }, + //---选择分类门店--- + choice_sort_store: function (e) { + var index = e.currentTarget.dataset.index; + var region_name = e.currentTarget.dataset.region; + var item = this.data.all_sto[index]; + this.setData({ + region_name: region_name, + sort_store: 0, + choice_sort_store: 1, + sec_sto: item, + sec_pick_index: 0 + }); + }, + + choose_for_store_fir: function (e) { + var index_c = e.currentTarget.dataset.ind; + var th = this; + th.setData({ + fir_pick_index: index_c + }) + + }, + + //确定def_pick为选择的门店 + sure_pick: function (e) { + var th = this; + var item = null; + var openindstore = th.data.open_ind_store; + + if (th.data.choice_sort_store == 0) { + var index = th.data.fir_pick_index; + if (th.data.is_show_sto_cat == 1) { + item = th.data.def_pickpu_list[index]; + } else { + item = th.data.only_pk[index]; //当没有门店分类的时候 + } + + } else { + var index = th.data.sec_pick_index; + item = th.data.sec_sto.s_arr[index]; + } + + if (!th.data.sele_g) return false; + + th.setData({ + def_pick_store: item, + sto_sele_name: item.pickup_name, + sto_sele_id: item.pickup_id, + sto_sele_distr: item.distr_type, + store: 0, + choice_sort_store: 0, + fir_pick_index: 0, + openSpecModal: !0, + }); + + + }, + //---点击二级之后的选择--- + choose_for_store: function (e) { + var index_c = e.currentTarget.dataset.ind; + var th = this; + th.setData({ + sec_pick_index: index_c, + fir_pick_index: index_c + }) + + }, + //把选择的门店设置成默认的门店def_pick + set_def_pick: function (e) { + var th = this; + var item = null; + if (th.data.choice_sort_store == 0) { + var index = th.data.fir_pick_index; + if (th.data.is_show_sto_cat == 1) { + item = th.data.def_pickpu_list[index]; + } else { + item = th.data.only_pk[index]; //当没有门店分类的时候 + } + } else { + var index = th.data.sec_pick_index; + item = th.data.sec_sto.s_arr[index]; + } + + th.setData({ + def_pick_store: item, + sto_sele_name: item.pickup_name, + sto_sele_id: item.pickup_id, + sto_sele_distr: item.distr_type, + store: 0, + choice_sort_store: 0, + openSpecModal: !0, + }); + + var user_id=getApp().globalData.user_id; + var def_pickup_id = item.pickup_id; + getApp().request.put('/api/weshop/users/update', { + data: { + user_id: user_id, + def_pickup_id: def_pickup_id + }, + success: function (res) { + if (res.data.code == 0) { + if (th.data.choice_sort_store == 0) th.setData({ + fir_pick_index: 0 + }); + getApp().globalData.pk_store = item; + } else { + getApp().my_warnning("设置默认门店地址失败", 0, th) + } + + } + }); + + + + }, + closeSpecModal: function () { + this.setData({openSpecModal: 0}); + }, + + buy_libao:function () { + com.buy_libao(this) + } }) \ No newline at end of file diff --git a/pages/giftpack/buygiftpack/giftpackbuy.wxml b/pages/giftpack/buygiftpack/giftpackbuy.wxml index ab4a751..338b8a4 100644 --- a/pages/giftpack/buygiftpack/giftpackbuy.wxml +++ b/pages/giftpack/buygiftpack/giftpackbuy.wxml @@ -62,30 +62,30 @@ - + - + - + - + - + @@ -116,4 +116,6 @@ - \ No newline at end of file + + + \ No newline at end of file diff --git a/pages/giftpack/buygiftpack/giftpackbuy.wxss b/pages/giftpack/buygiftpack/giftpackbuy.wxss index b9a7391..f77f8bf 100644 --- a/pages/giftpack/buygiftpack/giftpackbuy.wxss +++ b/pages/giftpack/buygiftpack/giftpackbuy.wxss @@ -1,9 +1,6 @@ /*引用样式路径*/ @charset "UTF-8"; - -/* Author XGQ - * 2019-11-12 - */ +@import '../../goods/goodsInfo/goodsInfo.wxss'; page { /* background-color: #fb7454; */ diff --git a/pages/giftpack/giftpacklist/giftpacklist.js b/pages/giftpack/giftpacklist/giftpacklist.js index 548ea43..b37183c 100644 --- a/pages/giftpack/giftpacklist/giftpacklist.js +++ b/pages/giftpack/giftpacklist/giftpacklist.js @@ -4,6 +4,7 @@ var e = getApp(), t = e.request, d = e.globalData; var ut = require("../../../utils/util.js"); +var com = require("../public/buy_com.js"); Page({ data: { @@ -30,6 +31,43 @@ Page({ is_lb: 0, //是否有礼包 default_color: null, first_leader: e.globalData.first_leader || 0, // 推荐人ID + + //门店相关 + ismend: 0, + is_sec_mend: 0, + sto_sele_name: "", //选中的门店名称 + sto_sele_id: "", //选中的门店id + sto_sele_distr: "", //选择的门店的配送方式 + is_show_sto_cat: 1, //是否显示门店分类 + only_pk: null, + all_sto: null, + sec_sto: null, //选择了的门店分类 + pickpu_list: null, //读出的所有门店list + def_pickpu_list: null, //一开始5个门店list + sec_pick_index: 0, //第二级门店选择ID + fir_pick_index: 0, //第一级门店选择ID + all_pick_list: null,//所有的门店先记录起来 + + select_store: 0, //选择更多 + index: 1, + more_store: 0, //选择门店 + sort_store: 0, //门店分类 + choice_sort_store: 0, //选择分类门店 + new_user: 0, //新用户 + + def_pick_store: null, // 默认的门店 + fir_def_store: null, //客户默认的门店的 + lat: null, //维度 + lon: null, //经度 + + is_get_local_ok: 0, //获取坐标是否完成 + region_name: "门店分类", //区域的名字 + is_gps: 1, + open_ind_store: 0, //哪里打开的门店列表的控制属性 + default_store: {}, //创建添加默认门店地址的对象 + + store:0, + openSpecModal:0 }, onLoad: function (options) { this.setData({ @@ -87,81 +125,36 @@ Page({ GetBuyPrice: function (e) { var that = this.data; var th = this; - // var id = e.currentTarget.dataset.id;//活动id //如果还没有开始的话 if (th.data.isStart != 1) { getApp().my_warnning("活动还没有开始", 0, th); return false; } - - var money = e.currentTarget.dataset.money; - var my_confirm = th.selectComponent("#my_confirm"); //组件的id - my_confirm.open( - "是否确定购买该礼包", - "取消", - "确定", - function () { - my_confirm.open_cancel(0); - }, - function () { - my_confirm.open_cancel(0); - - var json = { - "actId": '', //活动Id - "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 - "buyType": '2', //1=积分兑换 2=余额购买 - "giftBagId": that.getGiftID, //礼包Id - "storeId": a.stoid, //商家Id - "userId": d.user_id, //用户ID - "buyFrom": 2, - "first_leader": that.first_leader, - }; - - //-- 分享导购要记录 -- - if (getApp().globalData.guide_id) { - json.guide_id = getApp().globalData.guide_id; - } - - var data = JSON.stringify(json); - var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert"; - - getApp().request.json_post(url, json, - function (res) { - if (res.data.code == 0) { - var res = res.data.data; - if (!res) return false; - if (!res.result) return false; - - var order_sn = res.orderSn; - var url = "/pages/giftpack/payment/payment?money=" + money + "&order_sn=" + order_sn; - wx.requestPayment({ - timeStamp: String(res.result.timeStamp), - nonceStr: res.result.nonceStr, - package: res.result.packageValue, - signType: res.result.signType, - paySign: res.result.paySign, - success: function (n) { - getApp().goto(url); - }, - fail: function (n) { - getApp().my_warnning("取消支付", 0, th); - } - }); - } else { - getApp().my_warnning(res.data.msg, 0, th); + th.setData({ buyType:2 }) + if(th.data.sele_g.is_pickup){ + th.setData({ + openSpecModal:1 + }) + }else{ + var my_confirm = th.selectComponent("#my_confirm"); //组件的id + my_confirm.open( + "是否确定购买该礼包", + "取消", + "确定", + function () { + my_confirm.open_cancel(0); + }, + function () { + my_confirm.open_cancel(0); + com.buy_libao(th) } - }, - function (res) { - - } ) + } - } - ) }, GetBuyIntegral: function (e) { @@ -173,48 +166,28 @@ Page({ getApp().my_warnning("活动还没有开始", 0, th); return false; } - // var id = e.currentTarget.dataset.id;//活动id - var my_confirm = th.selectComponent("#my_confirm"); //组件的id - my_confirm.open( - "是否确定兑换该礼包", - "取消", - "确定", - function () { - my_confirm.open_cancel(0); - }, - function () { - my_confirm.open_cancel(0); - var json = { - "actId": '', //活动Id - "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 - "buyType": '1', //1=积分兑换 2=余额购买 - "giftBagId": that.getGiftID, //礼包Id - "storeId": a.stoid, //商家ID - "userId": d.user_id, //用户ID - "buyFrom": 2, - "first_leader": that.first_leader, - }; - //-- 分享导购要记录 -- - if (getApp().globalData.guide_id) { - json.guide_id = getApp().globalData.guide_id; - } - var data = JSON.stringify(json); - var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert"; - getApp().request.json_post(url, json, - function (res) { - if (res.data.code == 0) { - getApp().my_warnning("兑换成功!", 1, th); - } else { - getApp().my_warnning(res.data.msg, 0, th); - } - }, - function (res) { + th.setData({ buyType:1 }); + if(th.data.sele_g.is_pickup){ + th.setData({ + openSpecModal:1 + }) + }else { + var my_confirm = th.selectComponent("#my_confirm"); //组件的id + my_confirm.open( + "是否确定兑换该礼包", + "取消", + "确定", + function () { + my_confirm.open_cancel(0); + }, + function () { + my_confirm.open_cancel(0); + com.buy_libao(th) + }) + } - } - ) - }) }, @@ -334,7 +307,20 @@ Page({ actTitle: res.data.data.actTitle, wareCard: res.data.data.wareCard, isStart: isStart, + sele_g:res.data.data }) + + + var sele_g=res.data.data; + com.wait_for_store_config(_this2); + com.set_user_mo_store(_this2,os,function () { + if(sele_g.pickup_list && _this2.data.def_pick_store){ + com.check_def_pk(_this2); + } + }); + com.get_sto(_this2,os); + + } else { getApp().my_warnning(res.data.msg, 0, _this2); return false; @@ -421,6 +407,7 @@ Page({ //--- 分享设置 -- onShareAppMessage: function (e) { + getApp().globalData.no_clear=1; var curPage = this; var pagePath = curPage.route; //当前页面url if (pagePath.indexOf('/') != 0) { @@ -443,6 +430,7 @@ Page({ * 用户分享朋友圈 */ onShareTimeline() { + getApp().globalData.no_clear=1; var curPage = this; var pagePath = curPage.route; //当前页面url if (pagePath.indexOf('/') != 0) { @@ -471,50 +459,298 @@ Page({ getApp().my_warnning("活动还没有开始", 0, th); return false; } - // var id = e.currentTarget.dataset.id;//活动id - var my_confirm = th.selectComponent("#my_confirm"); //组件的id - my_confirm.open( - "是否确定领取该礼包", - "取消", - "确定", - function () { - my_confirm.open_cancel(0); - }, - function () { - my_confirm.open_cancel(0); - var json = { - "actId": '', //活动Id - "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 - "buyType": '3', //1=积分兑换 2=余额购买 - "giftBagId": that.getGiftID, //礼包Id - "storeId": a.stoid, //商家ID - "userId": d.user_id, //用户ID - "buyFrom": 2, - "first_leader": that.first_leader, - }; - - //-- 分享导购要记录 -- - if (getApp().globalData.guide_id) { - json.guide_id = getApp().globalData.guide_id; + + th.setData({ buyType:3 }); + if(th.data.sele_g.is_pickup){ + th.setData({ + openSpecModal:1 + }) + }else { + + + // var id = e.currentTarget.dataset.id;//活动id + var my_confirm = th.selectComponent("#my_confirm"); //组件的id + my_confirm.open( + "是否确定领取该礼包", + "取消", + "确定", + function () { + my_confirm.open_cancel(0); + }, + function () { + my_confirm.open_cancel(0); + com.buy_libao(th) + }) + } + + + }, + + //--- 设置一下默认库存的数量 ---- + set_def_storage(ee) { + var that = this, th = this; + that.data.fir_def_store = ee; + + that.setData({ + def_pick_store: ee, + sto_sele_name: ee.pickup_name, + sto_sele_id: ee.pickup_id, + sto_sele_distr: ee.distr_type + }) + }, + // 选择门店 + choice_store: function (ee) { + var th = this; + var ind = ee.currentTarget.dataset.ind; + var bconfig = th.data.bconfig; + + if (!th.data.only_pk && !th.data.def_pickpu_list) { + getApp().confirmBox("门店库存不足", null, 25000, !1); + return false; + } + + if (th.data.only_pk && !th.data.only_pk.length) { + getApp().confirmBox("门店库存不足", null, 25000, !1); + return false; + } + if (th.data.def_pickpu_list && !th.data.def_pickpu_list.length) { + getApp().confirmBox("门店库存不足", null, 25000, !1); + return false; } - var data = JSON.stringify(json); - var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert"; - getApp().request.json_post(url, json, - function (res) { - if (res.data.code == 0) { - getApp().my_warnning("领取成功!", 1, th); + + if (bconfig && bconfig.is_sort_storage) { + wx.getLocation({ + type: 'gcj02', + success: function (res) { + + th.data.lat = res.latitude; + th.data.lon = res.longitude; + th.data.is_get_local_ok = 1; + th.setData({ + is_gps: 1 + }); + //th.onShow(); + com.get_sto(th,os); + }, + fail: function (res) { + //th.onShow(); + th.data.is_get_local_ok = 1; + com.get_sto(th,os); + if (res.errCode == 2) { + th.setData({ + is_gps: 0 + }); + if (th.data.is_gps == 0) { + getApp().confirmBox("请开启GPS定位", null, 25000, !1); + } + } else { + th.setData({ + is_gps: "3" + }); + } + + } + }) + } else { + th.data.is_get_local_ok = 1; + com.get_sto(th,os); + } + + if (ind != undefined && ind != null) { + this.setData({ + open_ind_store: ind, + store: 1, + openSpecModal: !1, + openSpecModal_pt: !1, + openSpecModal_flash_normal: !1, + }) + } else { + this.setData({ + store: 1, + openSpecModal: !1, + openSpecModal_pt: !1, + openSpecModal_flash_normal: !1 + + }) + } + }, + //关闭选择门店 + close_popup: function (e) { + var th = this; + this.setData({ + store: 0, + choice_sort_store: 0, + sort_store: 0, + fir_pick_index: 0, + sec_pick_index: 0 + }) + + var openindstore = this.data.open_ind_store; + if (openindstore == 1) { + th.setData({ + openSpecModal: !0, + openSpecModal_ind: openindstore, + }); + } else if (openindstore == 2) { + th.setData({ + openSpecModal: !0, + openSpecModal_ind: openindstore, + }); + } + else if (openindstore == 4) { //4就是拼团 + th.setData({ + openSpecModal_pt: 1, //打开拼团购买界面 + store: 0, //关闭门店 + choice_sort_store: 0, //关闭门店2级 + sort_store: 0, //关闭门店2级 + }); + } + else { + th.setData({ + store: 0, + choice_sort_store: 0, + sort_store: 0 + }) + } + + + }, + + //选择更多门店 + more_store: function () { + this.setData({ + sort_store: 1 + }); + }, + // 返回按钮 + returns: function () { + this.setData({ + sort_store: 0, + choice_sort_store: 0 + }); + }, + //---选择分类门店--- + choice_sort_store: function (e) { + var index = e.currentTarget.dataset.index; + var region_name = e.currentTarget.dataset.region; + var item = this.data.all_sto[index]; + this.setData({ + region_name: region_name, + sort_store: 0, + choice_sort_store: 1, + sec_sto: item, + sec_pick_index: 0 + }); + }, + + choose_for_store_fir: function (e) { + var index_c = e.currentTarget.dataset.ind; + var th = this; + th.setData({ + fir_pick_index: index_c + }) + + }, + + //确定def_pick为选择的门店 + sure_pick: function (e) { + var th = this; + var item = null; + var openindstore = th.data.open_ind_store; + + if (th.data.choice_sort_store == 0) { + var index = th.data.fir_pick_index; + if (th.data.is_show_sto_cat == 1) { + item = th.data.def_pickpu_list[index]; } else { - getApp().my_warnning(res.data.msg, 0, th); + item = th.data.only_pk[index]; //当没有门店分类的时候 } - }, - function (res) { } - ) - }) + } else { + var index = th.data.sec_pick_index; + item = th.data.sec_sto.s_arr[index]; + } + if (!th.data.sele_g) return false; + + th.setData({ + def_pick_store: item, + sto_sele_name: item.pickup_name, + sto_sele_id: item.pickup_id, + sto_sele_distr: item.distr_type, + store: 0, + choice_sort_store: 0, + fir_pick_index: 0, + openSpecModal: !0, + }); + + + }, + //---点击二级之后的选择--- + choose_for_store: function (e) { + var index_c = e.currentTarget.dataset.ind; + var th = this; + th.setData({ + sec_pick_index: index_c, + fir_pick_index: index_c + }) + + }, + //把选择的门店设置成默认的门店def_pick + set_def_pick: function (e) { + var th = this; + var item = null; + if (th.data.choice_sort_store == 0) { + var index = th.data.fir_pick_index; + if (th.data.is_show_sto_cat == 1) { + item = th.data.def_pickpu_list[index]; + } else { + item = th.data.only_pk[index]; //当没有门店分类的时候 + } + } else { + var index = th.data.sec_pick_index; + item = th.data.sec_sto.s_arr[index]; + } + th.setData({ + def_pick_store: item, + sto_sele_name: item.pickup_name, + sto_sele_id: item.pickup_id, + sto_sele_distr: item.distr_type, + store: 0, + choice_sort_store: 0, + openSpecModal: !0, + }); + + var user_id=getApp().globalData.user_id; + var def_pickup_id = item.pickup_id; + getApp().request.put('/api/weshop/users/update', { + data: { + user_id: user_id, + def_pickup_id: def_pickup_id + }, + success: function (res) { + if (res.data.code == 0) { + if (th.data.choice_sort_store == 0) th.setData({ + fir_pick_index: 0 + }); + getApp().globalData.pk_store = item; + } else { + getApp().my_warnning("设置默认门店地址失败", 0, th) + } - }, + } + }); + + + }, + closeSpecModal: function () { + this.setData({openSpecModal: 0}); + }, + + buy_libao:function () { + com.buy_libao(this) + } diff --git a/pages/giftpack/giftpacklist/giftpacklist.wxml b/pages/giftpack/giftpacklist/giftpacklist.wxml index dde865a..f4d613e 100644 --- a/pages/giftpack/giftpacklist/giftpacklist.wxml +++ b/pages/giftpack/giftpacklist/giftpacklist.wxml @@ -100,7 +100,7 @@ --> - + @@ -190,4 +190,6 @@ - \ No newline at end of file + + + \ No newline at end of file diff --git a/pages/giftpack/giftpacklist/giftpacklist.wxss b/pages/giftpack/giftpacklist/giftpacklist.wxss index 958233b..9fb4397 100644 --- a/pages/giftpack/giftpacklist/giftpacklist.wxss +++ b/pages/giftpack/giftpacklist/giftpacklist.wxss @@ -1,8 +1,5 @@ @charset "UTF-8"; - -/* Author XGQ - * 2019-12-12 - */ +@import '../../goods/goodsInfo/goodsInfo.wxss'; .box.data-v-3a5b7e36 { -webkit-align-content: center; diff --git a/pages/user/assistance/giftpacklist.wxml b/pages/user/assistance/giftpacklist.wxml index 53d5937..831da68 100644 --- a/pages/user/assistance/giftpacklist.wxml +++ b/pages/user/assistance/giftpacklist.wxml @@ -79,7 +79,7 @@ - + diff --git a/pages/user/coupons/coupons.js b/pages/user/coupons/coupons.js deleted file mode 100644 index d597009..0000000 --- a/pages/user/coupons/coupons.js +++ /dev/null @@ -1,624 +0,0 @@ -var t = getApp(), - a = t.request, - o = t.globalData.setting, - os = o, - i = require("../../../utils/util.js"), - ut = i, - s = require("../../../utils/common.js"); -var regeneratorRuntime = require('../../../utils/runtime.js'); -const { - barcode, - qrcode -} = require('../../../utils/index.js'); -let _this = null; - -Page({ - data: { - - val:false, - datet: "", - dates: "", - parameter: false, - details:[],//数据 - isBind:true,//控制清空时间日期的按钮 - isBinds: true, - select: false,//下拉框 - grade_name: '未使用', - // grades: [ //old - // '所有', - // '已使用', - // '已过期', - // '未使用', - // ], - currentIndex: 0, //tab项当前指示器 - grades: [ - '未使用', - '已使用', - '已过期', - ], - display:false, - is_no_more: 0, - current_page:1, - by_list:[], - isloading:0, - pageNum: 1, - }, - /** - * 生命周期函数--监听页面加载 - */ - onLoad: function (options) { - _this = this; - this.setData({ - details: [] - }); - this.wjquery(); - }, - /** - * 生命周期函数--监听页面显示 - */ - onShow: function (options) { - var th = this; - - wx.setNavigationBarTitle({ - title: "我的优惠券", - }); - - /** - * 控制显示微券兑换 - * by sty - */ - getApp().getConfig2(function (ee) { - var json_d = JSON.parse(ee.switch_list); - let is_show_dhwz = json_d.dhwz_switch; - let grades = th.data.grades; - // console.log('is_show_dhwz----------------------------',is_show_dhwz); - if(is_show_dhwz) { - if(grades.indexOf('微券兑换') == -1) { - grades.push('微券兑换'); - th.setData({ grades }); - }; - }; - th.setData({ is_show_dhwz }); - },1); - }, - - - - - // 点击选中二维码 - click: function (e) { - var val = e.currentTarget.dataset.cashrepno; - getApp().globalData.val = val; - wx.navigateTo({ - url: '../qr_code/qr_code', - }) - }, - // 点击返回主页 - // clicks: function () { - // this.setData({ - // hide:true, display:false - // }) - // }, - //监听输入框显示清空按钮 - watchPassWord: function (event) { - var val = event.detail.value; - if (val != "" && val != null) { - var isBind = false; - this.setData({ isBind: isBind }); - - } - }, - /** - * 点击下拉框 - */ - bindShowMsg() { - this.setData({ - select: !this.data.select - }) - }, - /** - * 已选下拉框 - */ - // mySelect(e) { - // var name = e.currentTarget.dataset.name; - // this.setData({ - // grade_name: name, - // select: false - // }) - // }, - - /** - * 点击tab - * by sty - */ - clickTab(e) { - let index = e.target.dataset.index; - let name = e.target.dataset.name; - - this.setData({ - is_get: 0, - pageNum: 1, - grade_name: name, - currentIndex: index, - is_no_more: 0, - current_page: 1, - noMore: false, - details: [], - by_list: [], - showQr: false, - }); - - - if(index == 3) {//微券兑换 - this.exchange(); - } else {//其他 - this.wjquery(); - }; - }, - - /** - * 点击"立即使用" - * by sty - */ - clickUse(e) { - let useIndex = e.currentTarget.dataset.index; - let val = e.currentTarget.dataset.cashrepno; - - - this.setData({ - showQr: true, - useIndex, - }); - this.qrcode(val); - }, - - /** - * 关闭二维码 - * by sty - */ - closeQr() { - this.setData({ - showQr: false, - }); - }, - - /** - * 生成二维码 - * by sty - */ - qrcode:function(val){ - // console.log(val); - barcode('barcode', val, 600,160); - qrcode('qrcode', val, 300, 300); - }, - - /** - * 请求微券列表 - * by sty - */ - async exchange() { - var result; - var user_id = getApp().globalData.user_id; - var store_id = os.stoid; - - - this.getData(true, '/api/weshop/users/listExchangeCoupons', { - user_id: user_id, store_id: store_id, - }).then(()=>{ - _this.setData({ - result: _this.data.list.pageData, - }); - }); - - // await getApp().request.promiseGet("/api/weshop/users/listExchangeCoupons", { - // data: { - // user_id: user_id, store_id: store_id, - // } - // }).then(res => { - // // var msg = res.data; - // // result = msg.data.pageData; - // }) - // e.setData({ - // result: result - // }) - }, - - /** - * 微券兑换对话框 - * by sty - */ - async clickExchange(e) { - var th=this; - var index = e.currentTarget.dataset.index; - var item = this.data.result[index]; - this.data.monye = item.ToSum; - this.data.integr = item.Integral; - this.data.number = item.Number; - - let content = `确定使用${th.data.integr}积分兑换代金券面值${th.data.monye}元吗?`; - wx.showModal({ - title: '提示', - content: content, - success (res) { - if (res.confirm) { - console.log('用户点击确定'); - th.sure_pay(); - } else if (res.cancel) { - console.log('用户点击取消') - } - } - }); - - - - // var my_con = this.selectComponent("#my_con"); //组件的id - // var title="是否使用"+th.data.integr+"积分兑换代金券面值"+th.data.monye+"元"; - // my_con.open(title, "确定", "取消", th.sure_pay, null) - }, - - - /** - * 微券兑换 - * by sty - */ - sure_pay:function(){ - var monye=this.data.monye; - var integr=this.data.integr; - var number=this.data.number; - - var user_id = getApp().globalData.user_id; - console.log(integr,"是什么微卷",typeof integr,monye); - var store_id = os.stoid; - getApp().request.post("/api/weshop/users/saveInterToCash", { - data: { - user_id: user_id, - store_id: store_id, - money:monye, - integ:integr, - number:number, - }, - success: function (su) { - if (su.data.data!=null) { - // getApp().showWarning("兑换成功"); - wx.showToast({ - title: '兑换成功', - icon: 'success', - }); - }else{ - // getApp().showWarning("积分不足"); - wx.showToast({ - title: '积分不足', - icon: 'error', - }); - } - } - - }) - }, - - - //明细查询 - Gettime:function(e){ - var page = 0; - //开始获取时间 - var th = this; - var stime = th.data.datet; - var etime = th.data.dates; - var tpye = th.data.grade_name; - - //开始获取时间结束 - //删除字符中的—— - var datatk = stime.replace(/[-]/g, ""); - var dataj = etime.replace(/[-]/g, ""); - //转换类型 - var datak = parseInt(datatk); - var dataj = parseInt(dataj); - - //判断初始时间小于结束时间 - if (datak > dataj) { - getApp().showWarning("结束时间错误"); - } else { - this.setData({ details: [] }); - this.data.current_page=1; - this.data.is_no_more=0; - this.data.by_list=[]; - this.data.details=[]; - this.wjquery(); - } - - }, - - //微卷查询流水明细 - async wjquery() { - if(this.data.isloading) return; - if(this.data.is_no_more) return; - this.data.isloading=1; - var th=this; - - var len = this.data.details.length; - - var e = this,sum, val, number; - var user_id = getApp().globalData.user_id; - var store_id = os.stoid; - - var stime = this.data.datet; - var etime = this.data.dates; - - var tpye = this.data.grade_name; - console.log("是什么类型",tpye); - var IsUse = 0; - var e = this; - var get_data = { - user_id: user_id, - store_id: store_id, - // pageSize: 10, - page: e.data.current_page, - }; - - var dd={ - user_id: user_id, - store_id: store_id, - // pageSize: 10, - }; - dd.isuse=0; - // 判断下拉框,添加类型 - if (tpye == "已使用"){ - get_data.IsUse = 1; - dd.isuse=1; - } else if (tpye == "已过期"){ - get_data.IsUse = 2; - } else if (tpye == "未使用"){ - get_data.IsUse = 0; - }; - if (etime != "" && etime != null) { - get_data.EndDate = etime; - - //时间要转成时间戳 - var new_t=new Date(etime)/1000; - dd.etime=new_t; - } - - if (stime != "" && stime != null) { - get_data.BeginDate= stime; - //时间要转成时间戳 - var new_t=new Date(stime)/1000; - dd.stime=new_t; - } - - var by_list=[]; - if(th.data.current_page==1){ - //先拿包邮券 - await getApp().request.promiseGet("/api/weshop/userfeemail/pageAndArea?pageSize=100", { - data: dd, - }).then(res => { - - if(res.data.code == 0) { - th.setData({ - byTotal: res.data.data.total, - }); - }; - - if(res.data.code==0 && res.data.data && res.data.data.total>0){ - - by_list=res.data.data.pageData; - for(var i in by_list){ - by_list[i].isby=1; - //过滤是时间的范围 - if(get_data.IsUse == 2 && by_list[i].use_end_time<=ut.gettimestamp()){ - th.data.by_list.push(by_list[i]); - }else if(get_data.IsUse == 0){ - th.data.by_list.push(by_list[i]); - }else if(get_data.IsUse==1){ - th.data.by_list.push(by_list[i]); - }else if(get_data.IsUse==undefined){ - th.data.by_list.push(by_list[i]); - } - } - } - }) - } - - var big_arr = this.data.details; ///api/weshop / users / listQuan - if(th.data.current_page==1 && th.data.by_list.length>0) { - big_arr=th.data.by_list; - }; - - - await getApp().request.promiseGet("/api/weshop/users/listQuan", { - data: get_data, - isShowLoading: 1 - - }).then(res => { - - th.data.isloading=0; - var a = res.data; - var len = e.data.details.length; - var details = a.data.pageData; - - th.setData({ - pageSize: a.data.pageSize, - wjTotal: a.data.total, - }); - - if (details.length == 0) { - this.setData({ - is_no_more: 1, - }); - // getApp().showWarning("未找更多数据"); - if(th.data.by_list && th.data.current_page==1){ - th.setData({ val: val,details:th.data.by_list}); - details=th.data.by_list; - setTimeout(function () { - for (var i = 0; i < details.length; i++) { - var no = i + len; - qrcode('qrcode' + no, details[i].no,460, 460); - } - }, 100) - } - return false; - } - - th.data.current_page++; - val = a.data.total+th.data.by_list.length; - - big_arr=big_arr.concat(details); - this.setData({ - details: big_arr,val: val, - is_get: 1, - current_page: this.data.current_page, - }); - - setTimeout(function () { - if(by_list) details=big_arr; - for (var i = 0; i < details.length; i++) { - var no = i + len; - qrcode('qrcode' + no, details[i].CashRepNo?details[i].CashRepNo:details[i].no,460, 460); - } - }, 100) - }) - - - - }, - - - // 使用说明详情展开 - clickDetails: function(e) { - let details = this.data.details; - let index = e.currentTarget.dataset.index; - details[index].isShowDetails = !details[index].isShowDetails; - this.setData({ - details, - }); - }, - - - - //---加载更多是靠这个函数---- - onReachBottom: function () { - if(this.data.currentIndex != 3) { - this.wjquery(); - } else { - this.scrollToLower('/api/weshop/users/listExchangeCoupons', { - user_id: getApp().globalData.user_id, - store_id: os.stoid, - }, function() { - // console.log('!!!!!', _this.data.list.pageData); - _this.setData({ - result: _this.data.list.pageData, - }); - }); - }; - }, - - - //起始时间 - // bindDateChenge: function(e) { - // console.log("是什么", e.detail.value); - // var isBind = false; - // this.setData({ - // datet: e.detail.value, isBind: isBind - // }); - // }, - // 结束时间 - // bindDateChenges: function(e) { - // console.log("是什么", e.detail.value); - // var isBinds = false; - // this.setData({ - // dates: e.detail.value, isBinds: isBinds - // }); - // }, - //catchtap阻止冒泡,点击清除开始时间的按钮 - // eliminate:function(){ - // console.log("试试"); - // var isBind= true; - // var data=""; - // this.setData({ datet: data, isBind: isBind}) - // }, - //catchtap阻止冒泡,点击清除结束时间的按钮 - // eliminates: function () { - // console.log("试试"); - // var isBinds = true; - // var dates = ""; - // this.setData({ dates: dates, isBinds: isBinds }) - // }, - - - - - - - // 上拉加载请求数据 - getData: function(isInit, url, data) { - return getApp().request.promiseGet(url, {data: data, isShowLoading: true,}) - .then((res) => { - _this.data.isLoading = false; - if(res.data.code == 0) { - if(isInit) {// 第一次加载 - _this.setData({ - list: res.data.data - }); - } else { - _this.setData({ - 'list.pageData': _this.data.list.pageData.concat(res.data.data.pageData) - }); - }; - - if((res.data.data.pageData.length == 0) || (res.data.data.pageSize * res.data.data.page >= res.data.data.total)) { - _this.setData({ - noMore: true - }); - }; - }; - }); - }, - - - // 上拉加载 - scrollToLower(url, requestData, callback) { - // 页面数据 - // let pageData = this.data.list.pageData; - // 数据总量 - let total = this.data.list.total; - // 单页最大数据量 - let pageSize = this.data.list.pageSize; - // 如果数据总量不为0且小于或等于单页最大数据量,说明数据已全部加载,显示‘没有更多了’ - if((total != 0)&&(total <= pageSize)) { - this.setData({ - noMore: true - }); - }; - - if(!this.data.isloading && !this.data.noMore) { - this.setData({ - isLoading: true, - pageNum: this.data.pageNum + 1 - }); - requestData.page = this.data.pageNum; - this.getData(false, url, requestData).then(()=>{ - if(callback) { - callback(); - }; - }); - }; - }, - - // 禁用滚动 - // disableScroll() { - // this.setData({ - // scrollType: 'disableScroll' - // }); - // }, - - //启用滚动 - // enableScroll() { - // this.setData({ - // scrollType: '', - // }); - // }, - - touchStart() {}, - touchMove() {}, - touchEnd() {}, - -}) \ No newline at end of file diff --git a/pages/user/coupons/coupons.json b/pages/user/coupons/coupons.json deleted file mode 100644 index 8851a02..0000000 --- a/pages/user/coupons/coupons.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "enablePullDownRefresh": false, - "usingComponents": { - "nodata": "/components/nodata/nodata" - } -} \ No newline at end of file diff --git a/pages/user/coupons/coupons.wxml b/pages/user/coupons/coupons.wxml deleted file mode 100644 index 0e79d2a..0000000 --- a/pages/user/coupons/coupons.wxml +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - {{item}} - - - - - - - - - 包邮券 - - - - 包邮券 - 微券来源: 微信商城 - - {{filter.showBtnText(currentIndex)}} - - - 有效期:{{detail.use_start_time==null?" " : time.format_time(detail.use_start_time)}} 至 {{time.format_time(detail.use_end_time)}} - 有效期:不限 - - - - - - - 使用说明:购买礼包得优惠券【消费满{{time.toFix(detail.condition,2)}}元可用】 - - - - - - - {{filter.getNum(detail.Sum)}} - - - - {{filter.getNum(detail.Sum)}}元微券 - 微券来源: {{detail.SendMan==null?'线下发放':detail.SendMan==''?"线下发放":detail.SendMan}} - - - {{filter.showBtnText(currentIndex)}} - - - - 有效期:{{detail.BeginDate==null ? " " : time.replace_time2(detail.BeginDate)}} 至 {{time.replace_time2(detail.ValidDate)}} - 有效期:不限 - - - - - - 使用说明:{{filter.getNum(detail.Sum)}}元优惠券,{{(detail.UseObjectID==null || detail.UseObjectID=='')?"全场通用":"仅限"+(detail.UseObjectName)+"使用"}},满 {{detail.BuySum==null || detail.BuySum==''?filter.getNum(0):filter.getNum(detail.BuySum)}}元使用 {{detail.region_list_name==null || detail.region_list_name==''?"":",不包邮地区:"+region_list_name}};{{detail.Remark1}} - 使用说明: {{filter.getNum(detail.Sum)}}元优惠券,{{(detail.UseObjectID==null || detail.UseObjectID=='')?"全场通用":"仅限"+(detail.UseObjectName)+"使用"}},满 {{detail.BuySum==null || detail.BuySum==''?filter.getNum(0):filter.getNum(detail.BuySum)}}元使用 {{detail.region_list_name==null || detail.region_list_name==''?"":",不包邮地区:"+region_list_name}} - - - - - - - - - - - {{filter.getNum(result.ToSum)}} - - - - {{result.Integral}}积分兑换{{filter.getNum(result.ToSum)}}元微券 - - - 立即兑换 - - - - - - - - - - - - - - —— 已经到底了 —— - - —— 已经到底了 —— - - - - - - - - - - - - - - - diff --git a/pages/user/coupons/coupons.wxss b/pages/user/coupons/coupons.wxss deleted file mode 100644 index 8d98860..0000000 --- a/pages/user/coupons/coupons.wxss +++ /dev/null @@ -1,681 +0,0 @@ -/* 大边框 */ -.big-rim{ - margin-top: 15rpx; - width: 100%; - height: 310rpx; -border-bottom: 8px solid #EEEEEE; -} -.min-rim{ -display: flex; -width: 100%; -height: auto; -margin-left: 30rpx; -} - -/* 开始时间 */ -.kssj{ - -display: inline-block; -height: 50rpx; -background-color: #EEEEEE; -border: 1px solid #DADADA; -width:200rpx; -border-radius: 3px; -line-height:40rpx; -} -/* 开始时间的文字 */ -.wz{ - display: inline-block; -font-size: 25rpx; -color: #333; -} -/* 日期控件 */ -.pi{ - width:200rpx; - height:auto; - margin-left:20rpx; - -} - - - -/* 查询内容 */ -.cxnr{ - margin-left:30rpx; - font-size:28rpx; - font-family: 'SimHei',Arial; -} -.rq-rim{ -position:relative; -left:0; -top:0; -} -/* 至 */ -.zi{ - - margin-top:14rpx; - font-size:28rpx; - font-family: 'SimHei',Arial; - margin-left:20rpx; - -} -/* 结束时间 */ - -.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%; -font-family: 'SimHei',Arial; -border-radius: 3px; -} -/* 查询内容的备考的边框 */ -.xknr-rim{ - display: flex; - width: 100%; - height: 55rpx; - line-height:105rpx; - margin-top:10rpx; - -} -/* 明细查询 */ -.botton{ - margin-left: 30rpx; - margin-top: 63rpx; - background-color: #C4182E; - width: 95%; - border-radius:10rpx; - text-align: center; - height: 70rpx; - line-height: 70rpx; - color: #FFF; - font-size: 25rpx; - border: none; - font-family: '微软雅黑'; - } - /* 底部边框线 - .bottom{ - width: 100%; - border-bottom: 20rpx solid #eeeeee; - } */ - /* 清空按钮的 边框*/ -.qc-rim{ - position:absolute; - top:10rpx; - left:175rpx; -} - -/*开始时间清空输入框的按钮*/ -.empty{ - width: 25rpx; - height: 25rpx; - border-radius:50%; - background: #767676; - color: #fff; - font-size: 25rpx; - text-align: center; - line-height:18rpx; -} -/* 结束时间清空输入框的按钮的边框 */ -.end-rim{ -position: absolute; - top: 11rpx; - left:173rpx; - width: 25rpx; - height: 25rpx; -} -/*结束时间清空输入框的按钮*/ -.end{ - - width: 25rpx; - height: 25rpx; - border-radius:50%; - background: #767676; - color: #fff; - font-size: 25rpx; - text-align: center; - line-height:21rpx; - -} - -/* 顶部 */ -.top{ - width: 200rpx; - height: 50rpx; - padding: 0 10rpx; - line-height: 50rpx; - font-size: 34rpx; - margin-top: 25rpx; - - -} -.images{ - width:35rpx; -height:30rpx; -margin-top:10rpx; -margin-left:-14rpx; - -} -.rim-images{ - width: 45rpx; - 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:225rpx; - position: relative; - z-index:1; - overflow: hidden; - text-align: left; - animation: myfirst 0.5s; - font-size: 25rpx; -} -.select_one { - padding-left: 20rpx; - width: 100%; - height: 60rpx; - line-height: 60rpx; -} -/* 优惠券样式 */ -.body{ - text-align: center; - padding: 20rpx; - margin: 20rpx auto; - width: 80%; - max-width: 1000rpx; - font-size: 28rpx; - color: #333333; - border-bottom: 2rpx solid #EEEEEE; -} - -.b_iimg{ - background-color: red; - width: 400rpx; - height: 400rpx; -} - -.b_sz2{ - font-size: 40rpx; - color: #6fd137; - margin: 20rpx 0; - text-align: center; -} -/* 二维码列表查询 */ -/* 列表数据*/ -.data{ - width: 80%; - - height:auto; - margin-left:80rpx; - -} -.rim{ - position: relative; - top:0rpx; - left: 0rpx; -} -/* 二维码边框 */ -.code_rim{ - width: 100%; - height: auto; - text-align: center; - font-size: 25rpx; - padding-top: -30rpx; - margin-top:-20rpx; -padding-left:45rpx; - -} - -/* 二维码 */ -.code{ - height: 520rpx; - display: flex; - flex-direction: column; - justify-content: flex-end; - align-items: center; - margin-left:40rpx; - -} -.car-rim{ -width:98%; -height:177rpx; -text-align:center; -border-bottom:2rpx solid #eee; -margin-left:22rpx; - -} -/* 二维码值 */ -.code_val{ - margin-top:-104rpx; -margin-left:-59rpx; -color:#999999; - -} -/* 金额 */ -.moneys{ - margin-top:20rpx; - height: 47rpx; - width: 100%; - color:#6fd137; - text-align: center; - font-size: 38rpx; - font-family: 'SimHei',Arial; - margin-bottom:20rpx; - margin-left:11rpx; - -} -/* 文字 */ -.text{ - width: 100%; - font-size: 25rpx; - text-align: center; - - height: 41rpx; - color: #999999; -} -/* 二维码和条形码的边框 */ -.barqrcode{ - width: 100%; - height: auto; - margin-top:50rpx; - -} -/* 日期 */ -.rq{ - height: 25rpx; - font-size: 28rpx; - margin-top:12rpx; - font-family:'SimHei',Arial; -} -/* 点击条形 */ -.bar-container { - padding: 40rpx 20rpx 20rpx 20rpx; -} -.barcode { - width: 100%; - height: 100rpx; -} -/* 二维码边框*/ -.qrcode_rim { - width: 100%; - height: 420rpx; - display: flex; - flex-direction: column; - justify-content: flex-end; - align-items: center; - margin-left: 80rpx; - margin-top:-210rpx; - -} -.qrcode{ - /* margin-left: 100rpx; */ -} -/* 使用说明 */ -.textss{ - width: 100%; - font-size: 25rpx; - text-align: center; - - min-height: 47rpx; - height:auto; - color: #999999; -} - - - - - - -page { - background-color: #f0f0f0; - scroll-behavior: smooth; -} - -.c-fe0000 { - color: #fe0000; -} - -.tab-head { - display: flex; - position: sticky; - top: 0; - background-color: white; - font-size: 28rpx; - z-index: 2; -} - -.tab-head-item { - flex: 1; - text-align: center; - padding: 30rpx 0; - position: relative; -} - -.tab-head-item.active { - color: #fe0000; -} - -.tab-head-item.active::after { - content: ''; - width: 60%; - height: 4rpx; - background-color: #fe0000; - position: absolute; - bottom: 0; - left: 50%; - transform: translateX(-50%); -} - -.tab-body { - padding: 0 20rpx; - overflow: hidden; -} - - .tab-list-item { - border-radius: 10rpx; - overflow: hidden; - margin-top: 30rpx; - } - - - -.coupon { - position: relative; - - background: -webkit-radial-gradient(transparent 0, #FFD3D6 0) top left / 200rpx 100% no-repeat, - -webkit-radial-gradient(transparent 12rpx, #fff 0), - -webkit-radial-gradient(transparent 12rpx, #fff 0); - background: -moz-radial-gradient(transparent 0, #FFD3D6 0) top left / 200rpx 100% no-repeat, - -moz-radial-gradient(transparent 12rpx, #fff 0), - -moz-radial-gradient(transparent 12rpx, #fff 0); - background: -o-radial-gradient(transparent 0, #FFD3D6 0) top left / 200rpx 100% no-repeat, - -o-radial-gradient(transparent 12rpx, #fff 0), - -o-radial-gradient(transparent 12rpx, #fff 0); - background: radial-gradient(transparent 0, #FFD3D6 0) top left / 200rpx 100% no-repeat, - radial-gradient(transparent 12rpx, #fff 0), - radial-gradient(transparent 12rpx, #fff 0); -} - - -.coupon::after { - content: ''; - position: absolute; - height: 100%; - width: 8rpx; - top: 0; - left: 0; - - background: -webkit-linear-gradient(to bottom, #FFD3D6 8rpx, transparent 8rpx, transparent), - -webkit-radial-gradient(16rpx circle at 0rpx 16rpx, #f0f0f0 8rpx, #FFD3D6 8rpx); - - background: -moz-linear-gradient(to bottom, #FFD3D6 8rpx, transparent 8rpx, transparent), - -moz-radial-gradient(16rpx circle at 0rpx 16rpx, #f0f0f0 8rpx, #FFD3D6 8rpx); - - background: -o-linear-gradient(to bottom, #FFD3D6 8rpx, transparent 8rpx, transparent), - -o-radial-gradient(16rpx circle at 0rpx 16rpx, #f0f0f0 8rpx, #FFD3D6 8rpx); - - background: linear-gradient(to bottom, #FFD3D6 8rpx, transparent 8rpx, transparent), - radial-gradient(16rpx circle at 0rpx 16rpx, #f0f0f0 8rpx, #FFD3D6 8rpx); - - background-size: 16rpx 24rpx; - background-repeat: repeat-y; - } - - - .coupon2 { - /* width: 300px; */ - padding: 40rpx 0; - position: relative; - background: -webkit-radial-gradient(circle at right top, transparent 16rpx, #FFD3D6 0) top left / 200rpx 51% no-repeat, - -webkit-radial-gradient(circle at right bottom, transparent 16rpx, #FFD3D6 0) bottom left /200rpx 51% no-repeat, - -webkit-radial-gradient(circle at left top, transparent 16rpx, white 0) top right /calc(100% - 200rpx) 51% no-repeat, - -webkit-radial-gradient(circle at left bottom, transparent 16rpx, white 0) bottom right /calc(100% - 200rpx) 51% no-repeat; - background: -moz-radial-gradient(circle at right top, transparent 16rpx, #FFD3D6 0) top left / 200rpx 51% no-repeat, - -moz-radial-gradient(circle at right bottom, transparent 16rpx, #FFD3D6 0) bottom left /200rpx 51% no-repeat, - -moz-radial-gradient(circle at left top, transparent 16rpx, white 0) top right /calc(100% - 200rpx) 51% no-repeat, - -moz-radial-gradient(circle at left bottom, transparent 16rpx, white 0) bottom right /calc(100% - 200rpx) 51% no-repeat; - background: -o-radial-gradient(circle at right top, transparent 16rpx, #FFD3D6 0) top left / 200rpx 51% no-repeat, - -o-radial-gradient(circle at right bottom, transparent 16rpx, #FFD3D6 0) bottom left /200rpx 51% no-repeat, - -o-radial-gradient(circle at left top, transparent 16rpx, white 0) top right /calc(100% - 200rpx) 51% no-repeat, - -o-radial-gradient(circle at left bottom, transparent 16rpx, white 0) bottom right /calc(100% - 200rpx) 51% no-repeat; - background: radial-gradient(circle at right top, transparent 16rpx, #FFD3D6 0) top left / 200rpx 51% no-repeat, - radial-gradient(circle at right bottom, transparent 16rpx, #FFD3D6 0) bottom left /200rpx 51% no-repeat, - radial-gradient(circle at left top, transparent 16rpx, white 0) top right /calc(100% - 200rpx) 51% no-repeat, - radial-gradient(circle at left bottom, transparent 16rpx, white 0) bottom right /calc(100% - 200rpx) 51% no-repeat; - /* filter: drop-shadow(2px 2px 2px rgba(0,0,0,.2)); */ - } - - .coupon2::after { - content: ''; - height: 70%; - border: 2rpx dashed #fff; - position: absolute; - left: 198rpx; - top: 0; - bottom: 0; - margin: auto; - } - -/* .coupon2 .c-l, - .coupon2 .c-r { - border: 2rpx solid red; - padding: 20rpx 0; - } */ - - - - .c-l { - color: #fe0000; - width: 200rpx; - display: flex; - align-items: center; - justify-content: center; - flex-shrink: 0; - } - - .rmb::before { - content: '¥'; - font-size: 28rpx; - } - - .c-r { - box-sizing: border-box; - padding: 20rpx; - flex: 1; - } - - .c-time { - color: #7b7b7b; - font-size: 24rpx; - padding-top: 10rpx; - word-break: break-all; - } - - .btn, .btn2 { - font-size: 26rpx; - padding: 10rpx 20rpx; - border: 2rpx solid #fe0000; - border-radius: 30rpx; - flex-shrink: 0; - } - - .btn { - color: #fe0000; - } - - .btn.gray { - color: #ccc; - border-color: #ccc; - } - - .btn2 { - color: white; - background-color: #fe0000; - } - - .c-info { - border-top: 2rpx dashed #f0f0f0; - padding: 10rpx 40rpx 10rpx 10rpx; - font-size: 22rpx; - background-color: #fefefe; - color: #7b7b7b; - position: relative; - } - - .arrow-down::after { - font-family: iconfont; - content: '\e600'; - font-size: 32rpx; - position: absolute; - right: 10rpx; - top: 2rpx; - /* transform: translateY(-50%); */ - transition: all 0.3s; - } - - .arrow-down.active::after { - transform: rotateZ(180deg); - } - - .mask { - position: fixed; - width: 100%; - height: 100%; - top: 0; - background-color: rgba(0,0,0,.7); - z-index: 1; - } - - .popup-container { - position: fixed; - width: 70%; - border-radius: 12rpx; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - z-index: 3; - } - - .popup { - text-align: center; - border-radius: 12rpx; - background-color: white; - overflow: hidden; - /* width: 80%; */ - } - - .popup-container .icon-close { - color: rgba(255,255,255,.6); - } - - .popup-title { - padding: 40rpx 0; - color: #fe0000; - background-color: #FFD3D6; - position: relative; - } - - .popup-title::after { - content: ''; - position: absolute; - left: -20rpx; - bottom: -12rpx; - width: 130%; - height: 20rpx; - background: -webkit-radial-gradient(circle, #FFD3D6, #FFD3D6 20rpx, transparent 20rpx, transparent); - background: -moz-radial-gradient(circle, #FFD3D6, #FFD3D6 20rpx, transparent 20rpx, transparent); - background: -o-radial-gradient(circle, #FFD3D6, #FFD3D6 20rpx, transparent 20rpx, transparent); - background: radial-gradient(circle, #FFD3D6, #FFD3D6 20rpx, transparent 20rpx, transparent); - background-size: 40rpx 40rpx; - transform: rotate(180deg); - -webkit-transform: rotate(180deg); - } - - - .popup .rmb::before { - font-size: 40rpx; - } - - .img-qr { - display: block; - width: 300rpx; - height: 300rpx; - margin: 0 auto; - background-color: pink; - } - - .qrcode { - width: 300rpx; - height: 300rpx; - margin: 0 auto; - } - - - .noMore { - padding: 20rpx; - color: #bbb; - text-align: center; - font-size: 22rpx; - } - - .breakall { - word-break: break-all; - } - - /* .disableScroll { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - } */ - - - - - - - - - - - - - - - - diff --git a/pages/user/coupons/filter.wxs b/pages/user/coupons/filter.wxs deleted file mode 100644 index 4043c1f..0000000 --- a/pages/user/coupons/filter.wxs +++ /dev/null @@ -1,38 +0,0 @@ -var numFr = { - getNum: function(x) { - var f = parseFloat(x); - if (isNaN(f)) { - return false; - } - var f = Math.round(x * 100) / 100; - var s = f.toString(); - var rs = s.indexOf('.'); - if (rs < 0) { - rs = s.length; - s += '.'; - } - while (s.length <= rs + 2) { - s += '0'; - } - return f; - }, - showBtnText: function(index) { - switch(index) { - case 1: { - return '已使用'; - break; - }; - case 2: { - return '已过期'; - break; - }; - default: { - return '立即使用'; - }; - }; - }, -} -module.exports = { - getNum: numFr.getNum, - showBtnText: numFr.showBtnText, -} \ No newline at end of file diff --git a/pages/user/deposit/deposit.js b/pages/user/deposit/deposit.js deleted file mode 100644 index 64ebd7e..0000000 --- a/pages/user/deposit/deposit.js +++ /dev/null @@ -1,84 +0,0 @@ -var t = getApp(), - a = t.request, - o = t.globalData.setting, - os = o, - i = require("../../../utils/util.js"), - ut = i, - s = require("../../../utils/common.js"); -var regeneratorRuntime = require('../../../utils/runtime.js'); -Page({ - data:{ - yucun_money:0, - parameter:true, - iurl: o.imghost, - is_show_yckcz:0, - }, - /** - * 生命周期函数--监听页面显示 - */ - onShow: function () { - // --先判断会员状态-- - var user_info = getApp().globalData.userInfo; - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { - wx.navigateTo({ url: '/pages/togoin/togoin', }) - return false; - } - wx.setNavigationBarTitle({ - title: "预存款", - }) - - var th = this; - getApp().getConfig2(function (ee) { - var json_d = JSON.parse(ee.switch_list); - th.setData({ is_show_yckcz: json_d.yckcz_switch }); - },1) - }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady: function () { - this.yuck(); - }, - //预存款 - async yuck(){ - var user_id =getApp().globalData.user_id; - var store_id = os.stoid; - console.log(user_id, "有进来吗银行卡", store_id); - - await getApp().request.promiseGet("/api/weshop/users/listYuMoney", { - data: { user_id: user_id, store_id: store_id } - }).then(res => { - var a = res.data; - console.log("在这了",a); - var yucun_money = a.data.yucun_money; - var list= a.data.list1; - if (list.length != 0){ - console.log(list, "s1w" + yucun_money); - list=list.map(item=>{ - item['EndDate']=item['EndDate'].replace('00:00:00','23:59:59'); - return item; - }); - this.setData({ yucun_money: yucun_money, list: list, parameter: false }); - }else{ - console.log("在这里111", list.length); - this.setData({ parameter:true}); - } - - }) - - }, - - jumPage: function () { - wx.navigateTo({ - url: 'prepaid/prepaid', - - }) - }, - /** - * 生命周期函数--监听页面加载 - */ - onLoad: function (options) { - - }, -}) diff --git a/pages/user/deposit/deposit.json b/pages/user/deposit/deposit.json deleted file mode 100644 index 9e26dfe..0000000 --- a/pages/user/deposit/deposit.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/pages/user/deposit/deposit.wxml b/pages/user/deposit/deposit.wxml deleted file mode 100644 index 2fdc92f..0000000 --- a/pages/user/deposit/deposit.wxml +++ /dev/null @@ -1,39 +0,0 @@ - - - 预存款 - - {{yucun_money}} - - - - - - - 预存款充值 - - - - - - - 预存款余额 - - - - - - 暂无任何预存款 - - - - - {{list.ItemName}} - - ¥{{list.Balance}} - 注:截止日期: - {{list.EndDate==null?"不限":list.EndDate}} - - - - - \ No newline at end of file diff --git a/pages/user/deposit/deposit.wxss b/pages/user/deposit/deposit.wxss deleted file mode 100644 index 8d896b4..0000000 --- a/pages/user/deposit/deposit.wxss +++ /dev/null @@ -1,187 +0,0 @@ -/* 图片 */ -.pictuer{ - position:relative; - top:0rpx; - left:0rpx; - width: 100%; - height: 180rpx; -} -/* 资产的大边框 */ -.big{ - color: #FFFFFF; - position: absolute; - top: 30rpx; - left: 45rpx; - width: 665rpx; - height:auto; -} -/* 总资产 */ -.font-one{ -font-size:28rpx; -text-align: left; -height: 50rpx; -line-height:50rpx; -} -/* 人民币符号 */ -.rmb{ - display: flex; - width: 27rpx; - height: 41rpx; - font-size:25rpx; - margin-top:20rpx; -} -/* 资产金额 */ -.font-two{ - width: 100rpx; - height:35rpx; - font-size:25rpx; - font-family: 'SimHei',Arial; - margin-top:24rpx; -padding-top:4rpx; - -} -/* 流动资金的边框 */ -.min-rim-one{ - display: flex; - width: 100%; - height:80rpx; - line-height: 80rpx; - border-bottom: 1px solid #EEEEEE; -} -/* 预存款 */ -.deposit{ -display: flex; -widows: 150rpx; -height: 35rpx; - - - -} -/* 流动资金的小图片 */ -.picture-two{ - margin-top:25rpx; - width: 45rpx; - height: 35rpx; - margin-left: 20rpx; -} -/* 流动资金 */ -.ldzj-font{ - width: 200rpx; - font-size: 25rpx; - margin-left: 20rpx; - color: #000000; -} -.picture-three{ - margin-top:40rpx; - margin-left: 380rpx; - height: 30rpx; - width: 20rpx; -} -.picture-five{ - margin-top:25rpx; - margin-left: 420rpx; - height: 30rpx; - width: 20rpx; -} -.big-rim{ - width: 100%; - height: auto; - font-family: 'SimHei',Arial; - font-size: 35rpx; - color: #000000; - line-height: 60rpx; -} - - -.mysj{ - width: 100%; - height: 70rpx; - font-size: 25rpx; - text-align: center; - color:#000000; - margin-top:20rpx; -} -/*数据*/ - .data{ - display: flex; - width: 100%; - border-bottom: 1px solid #E8E8E8; - height: 120rpx; -} -/*左边的数据 */ -.left{ - width:70%; - height: 120rpx; -} -/* 单据单号 */ -.left-test{ - margin-left: 30rpx; - padding-top: 20rpx; - font-size: 35rpx; - color: #000000; - width: 100%; -} -/* 单据时间 */ -.time{ - margin-top: 10rpx; - font-size: 25rpx; - color: #999999; - width: 100%; -} -/* 流动资金的加减 */ -.money{ - padding-top:20rpx; - height: 70rpx; - width: 110rpx; - margin-left:130rpx; - font-size: 35rpx; - font-family: 'SimHei',Arial; -} - -/* 有数据的时候的大边框样式 */ -.rim_one{ -margin:20rpx auto; -width: 90%; -background: #fbc8b7; -height: 250rpx; -text-align: left; -border-radius: 10rpx; -} -/* 上边框 */ -.top_rim{ - width:80%; - font-family: 'SimHei',Arial; - padding: 0 45rpx; - margin:0 auto; - color: #fff; - font-size: 45rpx; - height: 100rpx; - line-height: 100rpx; - border-bottom: 1px dashed #FFFFFF; -} -/* 下边框 */ -.bottom_rim{ - width:80%; - height: 150rpx; - padding: 0 45rpx; - line-height: 150rpx; - margin:0 auto; -} -/* 下边框中的钱 */ -.bottom_one{ - font-size: 35rpx; - width:80%; - height:70rpx; - line-height: 250%; - font-family: 'SimHei',Arial; - color: #fff; - -} -.bottom_two{ - font-size: 28rpx; - width:80%; - height: 80rpx; - line-height:120%; - font-family: 'SimHei',Arial; - color: #fff; -} \ No newline at end of file diff --git a/pages/user/deposit/prepaid/fil.wxs b/pages/user/deposit/prepaid/fil.wxs deleted file mode 100644 index 20a9079..0000000 --- a/pages/user/deposit/prepaid/fil.wxs +++ /dev/null @@ -1,9 +0,0 @@ -function set_word(word){ - if(!word) return ''; - if(word.indexOf('复核')!==-1) return ''; - return word; -} - -module.exports = { - set_word: set_word -} \ No newline at end of file diff --git a/pages/user/deposit/prepaid/msg/msg.js b/pages/user/deposit/prepaid/msg/msg.js deleted file mode 100644 index 99706f5..0000000 --- a/pages/user/deposit/prepaid/msg/msg.js +++ /dev/null @@ -1,111 +0,0 @@ -// pages/user/member/bring/msg/msg.js -var t = getApp(),o = t.globalData.setting,os = o; -Page({ - - /** - * 页面的初始数据 - */ - data: { - // timer: '',//定时器名字 - // countDownNum: '3'//倒计时初始值 - iurl: o.imghost, - }, - - - /** - * 生命周期函数--监听页面加载 - */ - onLoad: function (options) { - - }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady: function () { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow: function () { - getApp().check_can_share(); - wx.setNavigationBarTitle({ - title: "支付成功", - }) - }, - // countDown: function () { - // let that = this; - // let countDownNum = that.data.countDownNum;//获取倒计时初始值 - // //如果将定时器设置在外面,那么用户就看不到countDownNum的数值动态变化,所以要把定时器存进data里面 - // that.setData({ - // timer: setInterval(function () {//这里把setInterval赋值给变量名为timer的变量 - // //每隔一秒countDownNum就减一,实现同步 - // countDownNum--; - // //然后把countDownNum存进data,好让用户知道时间在倒计着 - // that.setData({ - // countDownNum: countDownNum - // }) - // //在倒计时还未到0时,这中间可以做其他的事情,按项目需求来 - // if (countDownNum == 0) { - // //这里特别要注意,计时器是始终一直在走的,如果你的时间为0,那么就要关掉定时器!不然相当耗性能 - // //因为timer是存在data里面的,所以在关掉时,也要在data里取出后再关闭 - // clearInterval(that.data.timer); - // //关闭定时器之后,可作其他处理codes go here - // //--跳到绑定页面-- - // wx.navigateTo({ - // url: '../../../integral/jf', - // }) - // } - // }, 500) - // }) - - click:function(){ - wx.redirectTo({ - //url: '../../../integral/jf', - url:'../../deposit', - }) - }, - homepage:function(){ - - wx.navigateTo({ - url: "../../../../index/index/index", - }) - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide: function () { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload: function () { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh: function () { - - }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom: function () { - - }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage: function () { getApp().globalData.no_clear=1 - - } -}) \ No newline at end of file diff --git a/pages/user/deposit/prepaid/msg/msg.json b/pages/user/deposit/prepaid/msg/msg.json deleted file mode 100644 index 8835af0..0000000 --- a/pages/user/deposit/prepaid/msg/msg.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "usingComponents": {} -} \ No newline at end of file diff --git a/pages/user/deposit/prepaid/msg/msg.wxml b/pages/user/deposit/prepaid/msg/msg.wxml deleted file mode 100644 index 819e186..0000000 --- a/pages/user/deposit/prepaid/msg/msg.wxml +++ /dev/null @@ -1,12 +0,0 @@ - - - - -充值成功 -及时跟进订单信息哟! - - -继续购物 -返回首页 - - diff --git a/pages/user/deposit/prepaid/msg/msg.wxss b/pages/user/deposit/prepaid/msg/msg.wxss deleted file mode 100644 index 5e8634a..0000000 --- a/pages/user/deposit/prepaid/msg/msg.wxss +++ /dev/null @@ -1,82 +0,0 @@ -/* 边框 */ -.rim{ - width: 100%; - height: auto; - text-align: center; - -} - -.imgs{ - width:100rpx; - height:100rpx; - margin-top:20rpx; - margin-left:122rpx; - -} -/* 图片 */ -.img{ - width:110rpx; - height:110rpx; - margin: 40rpx 200rpx; - margin-right:60rpx; - -} -.zhon{ - width: 100%; - height: 168rpx; - margin-top:-20rpx; - -} -.czcg{ - width: 250rpx; - height: 135rpx; - color: #c4182e; - font-size: 50rpx; - font-family: 'SimHei',Arial; - margin-left:243rpx; - padding-top:20px; - - -} -/* 倒计时 */ -.itme{ - margin-top: -40rpx; - - width: 100%; - height: 50rpx; - color: #999; - font-family: 'SimHei',Arial; - font-size: 35rpx; -} -/* 按钮的边框 */ -.click{ - display: flex; - width: 100%; - height: 80rpx; -} -/* 返回上一页 */ -.top{ - margin-top: 30rpx; - background: #c4182e; - color: #fff; - text-align: center; - width: 45%; - height: 75rpx; - line-height: 75rpx; - border-radius:5px; - margin-left: 20rpx; - font-size: 32rpx; -} -.hom-page{ - margin-top: 30rpx; - font-size: 32rpx; - background: #c4182e; - color: #fff; - text-align: center; - width: 45%; - height:75rpx; - line-height: 75rpx; - border-radius:5px; - margin-left: 40rpx; -} - diff --git a/pages/user/deposit/prepaid/prepaid.js b/pages/user/deposit/prepaid/prepaid.js deleted file mode 100644 index 7de3b9b..0000000 --- a/pages/user/deposit/prepaid/prepaid.js +++ /dev/null @@ -1,223 +0,0 @@ -var t = getApp(), - a = t.request, - o = t.globalData.setting, - os = o, - i = require("../../../../utils/util.js"), - ut = i, - s = require("../../../../utils/common.js"); -var regeneratorRuntime = require('../../../../utils/runtime.js'); -Page({ - data: { - iurl: o.imghost, - showModal: false, //弹框控制器 - perpaid: [], //数据 - }, - /* 生命周期函数--监听页面初次渲染完成*/ - onReady: function() { - var th=this; - - getApp().request.get("/api/wx/weappSendlist/page", { - data: { - store_id: os.stoid, - typeid: "1002" - }, - success: function(res) { - if (res.data.code == 0 && res.data.data.pageData.length > 0) { - var template_id = res.data.data.pageData[0].template_id; - th.setData({template_id:template_id}); - } - } - }); - - this.yuck(); - }, - /*预存款的劵*/ - async yuck() { - var user_id = getApp().globalData.user_id; - var store_id = os.stoid; - console.log(user_id, "有进来吗银行卡", store_id ); - var e = this, - perpaid = ""; - await getApp().request.promiseGet("/api/weshop/users/listYucun", { - data: { - user_id: user_id, - store_id: store_id - } - }).then(res => { - // console.log(res.data.data[0].BeginDate) - var perpaids = res.data.data; - // var perpaid = res.data.data; - console.log( "是什么", perpaids); - e.setData({ - perpaid: perpaids - }); - }) - - }, - //立即充值获取参数到弹框 - submit: function(e) { - var money = e.target.dataset.name; - var s = e.target.dataset.money; - var advancek = e.target.dataset.advance; - - var item_type=e.target.dataset.item_type; - this.data.item_type=item_type; - - console.log("sss", e.target.dataset.name); - this.setData({ - showModal: true - }) - console.log("立即充值", s, "ss", o); - this.setData({ - BeginSum: money, - NewSum: s, - adv: advancek - }) - }, - //弹窗的方法 - preventTouchMove: function() { - - }, - /** -* 生命周期函数--监听页面显示 -*/ - onShow: function () { - wx.setNavigationBarTitle({ - title: "流动资金转预存", - }) - }, - //确定充值 - determine: function(e) { - var th=this; - this.setData({ - showModal: false - }) - console.log("aaa"); - var moneyone = e.target.dataset.moneyone; - var money = e.target.dataset.money; - var advancek = e.target.dataset.adv; - - this.sendsm(function(){ - th.recharge(money, advancek); - }) - - }, - //确定接口 - async recharge(money, advancek) { - console.log(money, "有进来吗银行卡", advancek); - var user_id = getApp().globalData.user_id; - var store_id = os.stoid; - var recharge_type = 0; - if(this.data.item_type==2) recharge_type=6; - - var buynum = 1; - console.log(money, "有进来吗预存劵", advancek, user_id, store_id ); - var e = this, - perpaid = ""; - await getApp().request.promiseGet("/api/weshop/users/getPay", { - data: { - account: money, - yucun_id: advancek, - user_id: user_id, - store_id: store_id, - recharge_type: recharge_type, - buynum: buynum , - } - }).then(res => { - console.log(res); - var getcode=res.data.code; - if (getcode!=0) - { - wx.showModal({ - title: '提示', - content:res.data.msg - }); - return false; - } - - - var msg = res.data.data; - var parentSn = msg.order_sn; - var store_id = os.stoid; - getApp().request.post("/api/weshop/order/pay/createRechargeOrder", { - data: { - parentSn: parentSn, - store_id: store_id - }, - success: function (su) { - console.log("su是什么",su); - var n=su.data.data; - console.log("su是什么", su); - - e.weixinPay(n, - function () { - e.jumpPaymentPage(); - }, function () { - getApp().showWarning("支付失败"); - }) - } - }) - }) - }, - //------支付成功页面-------- - jumpPaymentPage: function () { - wx.redirectTo({ - url:"msg/msg", - }); - }, - - //------调起支付框-------- - weixinPay: function (n, success, fail) { - if(!n) return false; - - wx.requestPayment({ - timeStamp: String(n.timeStamp), - nonceStr: n.nonceStr, - package: n.packageValue, - signType: n.signType, - paySign: n.paySign, - success: function (n) { - console.log(n), getApp().showSuccess("支付成功!"); - "function" == typeof success && success(); - wx.redirectTo({ - url: "../deposit/deposit" - }); - }, - fail: function (n) { - console.log(n), "requestPayment:fail" == n.errMsg ? getApp().showWarning("支付失败") : "requestPayment:fail cancel" == n.errMsg ? getApp().showWarning("您已取消支付") : getApp().showWarning("支付失败:" + n.errMsg.substr("requestPayment:fail ".length)), - "function" == typeof fail && fail(); - } - }); - }, - //关闭弹框 - shut: function () { - this.setData({ - showModal: false - }) - console.log("bb"); - - }, - - go_detail:function(e){ - var id=e.currentTarget.dataset.id; - getApp().goto('/packageA/pages/chongzhiDetails/chongzhiDetails?id=' + id); - }, - - - //订阅消息提醒 - sendsm:function(func) - { - var template_id = this.data.template_id; - // //授权订阅 - wx.requestSubscribeMessage({ - tmplIds: [template_id], - success(res) { - func(); - }, - fail(res) { - func(); - } - }) - - }, -}) diff --git a/pages/user/deposit/prepaid/prepaid.json b/pages/user/deposit/prepaid/prepaid.json deleted file mode 100644 index 8835af0..0000000 --- a/pages/user/deposit/prepaid/prepaid.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "usingComponents": {} -} \ No newline at end of file diff --git a/pages/user/deposit/prepaid/prepaid.wxml b/pages/user/deposit/prepaid/prepaid.wxml deleted file mode 100644 index b0f0384..0000000 --- a/pages/user/deposit/prepaid/prepaid.wxml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - {{perpaid.ItemName}} - 充{{perpaid.BeginSum}} - 送{{perpaid.NewSum}}元 - - 充值送大礼 > - - 备注: - {{fil.set_word(perpaid.Remark)}} - 立即充值 - - - - - - - - - - - - - - - - - - - - - - 充{{BeginSum}}送{{NewSum}}元 - - ¥ - {{BeginSum}} - - - - - - - - - - - - - - - diff --git a/pages/user/deposit/prepaid/prepaid.wxss b/pages/user/deposit/prepaid/prepaid.wxss deleted file mode 100644 index d027d41..0000000 --- a/pages/user/deposit/prepaid/prepaid.wxss +++ /dev/null @@ -1,258 +0,0 @@ -/* 图片 */ -.picture{ -/* margin-top: 5rpx; */ -width:100%; -height:270rpx; -display: block; -} -/* 预存款扣款情况 */ -.wz{ - width: 50%; - margin-top:-240rpx; - margin-left:40rpx; - font-size:30rpx; - color: #FFFFFF; - text-align:center; - padding-top:3px; - -} -/* 充钱的边框 */ -.rim{ - padding-top:25rpx; - color: #FFFFFF; - display: flex; - width: 50%; - height: 60rpx; - margin:auto; - margin-left:80rpx; -} -.con{ - padding-left: 30rpx; - font-size: 35rpx; -} -/* 钱 */ -.qian{ - margin-left: 5rpx; - - width: auto; - height: 50rpx; - font-size: 48rpx; - margin-top:-5rpx; - font-family: 'SimHei',Arial; -} -/* 送一百 */ -.q-one{ - margin-left:10rpx; - font-size:35rpx; -} -/* 备注 */ -.bz{ - width: 280rpx; - height: 124rpx; -margin-left: 475rpx; -margin-top: -120rpx; -font-size:28rpx; - border-bottom: 1px solid#d7d7d7; -} -/* 预存款扣款情况 */ -.yck{ - margin-top:15rpx; - font-size: 28rpx; - color: #999999; -} -/* 立即充值 */ -.ljcz{ - /* width: 2278rpx; - height: 111rpx; - font-size: 25rpx; - line-height: 320%; - color: #C4182E; - margin-left: 463rpx; - padding-left:66rpx; */ - padding-top: 20rpx; - color: red; -} -/* 弹出框的大边框 */ -.big-rim{ - width: 100%; - height: 320rpx; -} -/* 关闭的边框 */ -.gb-rim{ - padding-top:30rpx; - width: 65rpx; - height: 65rpx; - margin-top: 0rpx; - margin-left: 660rpx; -} -/* 关闭的边框 */ -.gb-rim { - padding-top: 33rpx; - width: 65rpx; - height: 65rpx; - margin-left: 675rpx; -} -/* 关闭的图片 */ - -.imag { - width: 60rpx; - height: 60rpx; -} - -/* 圆 */ -.yuan{ - width:60rpx; - height:60rx; - border-radius:50%; - border:5rpx solid #7f7e88; -} -/* 圆里的值 */ -.zhi{ - height:55rpx; - line-height:55rpx; - display:block; - color:#7f7e88; - text-align:center; -} - /* 充1000送100的边框 */ - .bk{ - margin-left: 20rpx; - height: 108; - width: 280rpx; - margin-top:-20rpx; - - } - /* 充1000送100 */ - .text{ - width:300rpx; - font-size: 40rpx; - font-family: 'SimHei',Arial; - - } - /* ¥ */ - .fh{ - display:inline-block; - width:23rpx; - height: 35rpx; - font-size: 30rpx; - color: red; - - } - /* 100 */ - .value{ - color: red; - display:inline-block; - width: 90rpx; - height: 45rpx; - font-size: 40rpx; - font-family: 'SimHei',Arial; - } - /* 按钮 */ - .button{ - width: 710rpx; - height: 77rpx; - line-height: 285%; - margin-top:43rpx; - font-size: 27rpx; - color: #FFFFFF; - background-color: #C4182E; - font-family: 'SimHei',Arial; - text-align:center; - } - -/* 蒙层 */ - .mask{ - width: 100%; - height: 100%; - position: fixed; - top: 0; - left: 0; - background: #000; - z-index: 9000; - opacity: 0.1; -} -.modalDlg{ - position: fixed; - z-index: 9999; - background-color: #fff; - border-radius: 10rpx; - flex-direction: column; - align-items: center; - bottom:0; - left:0; -} - -.give { - position: absolute; - margin-top: 70rpx; - margin-left: 60rpx; -} - -.list { - padding: 0 20rpx; -} - -.coupon { - box-sizing: border-box; - display: flex; - justify-content: space-between; - background-color: pink; - padding: 0 40rpx; - - - background-image: radial-gradient(circle at 8rpx 8rpx, transparent, red); - /* background-image: - radial-gradient( - circle at 0px 8px, - transparent 6px, - #ff9e6d 6px, - #ff9e6d 0px), - radial-gradient( - circle at 199px 8px, - transparent 6px, - #ff9e6d 6px, - #ff9e6d 0px); */ - background-size: 30px 30px; - /* background-position: 0 0, 200px 0; */ - /* background-repeat-y: no-repeat; */ - background-repeat-x: no-repeat; -} - -.left { - width: 464rpx; - display: flex; - flex-direction: column; - justify-content: center; - color: white; -} - -.right { - width: calc(100% - 464rpx); - display: flex; - flex-direction: column; - justify-content: center; -} - -.coupon-container { - position: relative; - margin-bottom: 10rpx; - text-align: center; -} - -.info-container { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - -} - -.pdv20 { - padding-top: 20rpx; - padding-bottom: 20rpx; -} - - - - diff --git a/pages/user/grow_value/grow_value.js b/pages/user/grow_value/grow_value.js index 504a472..9e6556a 100644 --- a/pages/user/grow_value/grow_value.js +++ b/pages/user/grow_value/grow_value.js @@ -182,7 +182,7 @@ Page({ var index=e.currentTarget.dataset.ind; switch (index) { case "0": getApp().goto("/pages/index/index/index");break; - case "1": getApp().goto("/pages/user/coupons/coupons"); break; + case "1": getApp().goto("/packageD/pages/user/coupons/coupons"); break; case "2": getApp().goto("/pages/user/userqy/userqy"); break; } }, diff --git a/pages/user/integral/filter.wxs b/pages/user/integral/filter.wxs deleted file mode 100644 index cb724f7..0000000 --- a/pages/user/integral/filter.wxs +++ /dev/null @@ -1,15 +0,0 @@ -var numFr = { - getNum: function(x) { - var f = parseInt(x); - return f; - }, - getval: function(x,n) { - var f = parseFloat(x); - f=f.toFixed(n); - return f; - } -} -module.exports = { - getNum: numFr.getNum, - getval: numFr.getval, -} \ No newline at end of file diff --git a/pages/user/integral/integral.js b/pages/user/integral/integral.js deleted file mode 100644 index 23f0272..0000000 --- a/pages/user/integral/integral.js +++ /dev/null @@ -1,374 +0,0 @@ -// pages/yhq/yhq.js -var e = function (e) { - return e && e.__esModule ? e : { - default: e - }; -}(require("../../../utils/LoadMore.js")), t = getApp(), a = t.request, o = t.globalData.setting, os = o, - i = require("../../../utils/util.js"), ut = i, b = require("../../../app.js"), app = b, s = require("../../../utils/common.js"), n = new e.default(); -var regeneratorRuntime = require('../../../utils/runtime.js'); -Page({ - - /** - * 页面的初始数据 - */ - data: { - details: [], //数据 - is_no_more:0, - current_page: 0, - showModal:false,//积分弹框的控制器 - number:0, - jfmx:true, - jfcz:false, - val:1, - /** - * 页面配置 - */ - winWidth: 0, - winHeight: 0, - // tab切换 - currentTab: 0, - money:1.00, - integral:50, - iurl: o.imghost, - - is_show_jfcz:0, - }, - /** - * 刷出积分劵 - */ - async exchange() { - var e = this, result; - var user_id = getApp().globalData.user_id; - var store_id = os.stoid; - var get_data = { - user_id: user_id, store_id: store_id, - pageSize: 10, page: e.data.current_page - ///api/weshop/users/listExchangeCoupons - }; //api/index/yuck - await getApp().request.promiseGet("/api/weshop/users/listExchangeCoupons", { - data:get_data - }).then(res => { - var msg = res.data; - result = msg.data.pageData; - }) - e.setData({ - result: result - }) - - }, - /** - * 积分明细 - */ - async detaileds() { - if (this.data.is_no_more) return; - this.data.current_page++; - var e = this, details; - var user_id = getApp().globalData.user_id; - var store_id = os.stoid; - var get_data = { - user_id: user_id, store_id: store_id, - pageSize: 10, page: e.data.current_page - }; - var big_arr = this.data.details; - await getApp().request.promiseGet("/api/weshop/users/listPoints", { - data: get_data - }).then(res => { - - var msg = res.data; - if(!msg || !msg.data.pageData || msg.data.pageData.length == 0){ - this.data.is_no_more = 1; - getApp().showWarning("未找更多数据"); - return false; - } - - details = msg.data.pageData; - details.forEach(function (val, ind) { - big_arr.push(val); - }) - setTimeout(() => { - this.setData({ - details: big_arr - }); - }, 1500) - }) - var get_datas= { - user_id: user_id, store_id: store_id, - }; - await getApp().request.promiseGet("/api/weshop/users/getAllPoints", { - data: get_datas - }).then(res => { - var msg = res.data; - var integrals=msg.data.Integral; - console.log(integrals); - this.setData({number: integrals}) - }) - - }, - //---加载更多是靠这个函数---- - onReachBottom: function () { - console.log("加载跟多"); - this.detaileds(); - - }, - //积分弹框控制器 - integral:function(e){ - var integral = e.target.dataset.integral; - var money = e.target.dataset.money; - console.log(money, "积分", integral); - this.setData({ - showModal: true, money: money, integral: integral - }) - }, - //弹窗的方法 - preventTouchMove: function () { - - }, - // 票数量的加 - plus:function(e){ - - var val = this.data.val; - val++; - console.log("加",val); - this.setData({ - val: val - }) - }, - //票数量的减 - reduce:function(e){ - - var val = this.data.val; - //console.log("减", val); - if (val>1){ - val--; - //console.log("减", val); - this.setData({ - val: val - }) - } - - }, - //关闭弹框 - shut: function (e) { - - this.setData({ showModal: false }) - console.log("bb"); - - }, - /** - * 点击tab切换 - */ - swichNav: function (e) { - console.log("是什么", e.target.dataset.current); - var val=e.target.dataset.current; - - var that = this; - if (this.data.currentTab== parseInt(e.target.dataset.current)) { - return false; - } else { - //如果是积分充值,但是不显示的话,不响应点击事件,退出 - if(val!=0 && !this.data.is_show_jfcz){ - return false; - } - that.setData({ - currentTab: e.target.dataset.current - }) - } - - if (val==0){ - console.log("积分明细", e.target.dataset.current); - var jfmx=true; - var jfcz= false; - this.setData({ jfmx: jfmx, jfcz: jfcz, current_page: 0,details:[] }); - this.detaileds(); - }else{ - if(this.data.is_show_jfcz) { - console.log("积分充值", e.target.dataset.current); - var jfmx = false; - var jfcz = true; - this.setData({jfmx: jfmx, jfcz: jfcz, current_page:1,result:[] }); - this.exchange(); - }else{ - return false; - } - } - - - }, - // 积分收支明细 - detailed:function(){ - wx:wx.navigateTo({ - url: 'query/index', - - }) - }, - /** - * 生命周期函数--监听页面加载 - */ - onLoad: function (options) { - - var th=this; - getApp().request.get("/api/wx/weappSendlist/page", { - data: { - store_id: os.stoid, - typeid: "1002" - }, - success: function(res) { - if (res.data.code == 0 && res.data.data.pageData.length > 0) { - var template_id = res.data.data.pageData[0].template_id; - th.setData({template_id:template_id}); - } - } - }); - - - }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady: function () { - - }, - - //点击确定 - determine(event) { - console.log(event.currentTarget.dataset.money); - var money = event.currentTarget.dataset.money; - var integral = event.currentTarget.dataset.integral; - var val = event.currentTarget.dataset.val - //console.log(money, integral, val,"参数", a); - var user_id = getApp().globalData.user_id; - var store_id = os.stoid; - var th= this, number; - - this.sendsm(function(){ - getApp().request.promiseGet("/api/weshop/users/getPay" - , { - data: { user_id: user_id, store_id: store_id, buynum: val, mon: money, integ: integral, recharge_type:1} - }).then(res => { - // console.log("1" + res); - var msg = res.data.data; - var parentSn = msg.order_sn; - var store_id = os.stoid; - - getApp().request.post("/api/weshop/order/pay/createRechargeOrder", { - data: { - parentSn: parentSn, - store_id: store_id - }, - success: function (su) { - var n = su.data.data; - th.weixinPay(n, - function () { - console.log("支付成功页面2333"); - th.jumpPaymentPage(); - }, function () { - getApp().showWarning("支付失败"); - }) - } - }) - }) - }) - - - - }, - //------支付成功页面-------- - jumpPaymentPage: function () { - console.log("支付成功页面2333"); - wx.redirectTo({ - url: "msg/msg" - }); - }, - - //------调起支付框-------- - weixinPay: function (n, success, fail) { - if(!n) return false; - wx.requestPayment({ - timeStamp: String(n.timeStamp), - nonceStr: n.nonceStr, - package: n.packageValue, - signType: n.signType, - paySign: n.paySign, - success: function (n) { - console.log(n), getApp().showSuccess("支付成功!"); - "function" == typeof success && success(); - // wx.redirectTo({ - // url: "jf" - // }); - }, - fail: function (n) { - console.log(n), "requestPayment:fail" == n.errMsg ? getApp().showWarning("支付失败") : "requestPayment:fail cancel" == n.errMsg ? getApp().showWarning("您已取消支付") : getApp().showWarning("支付失败:" + n.errMsg.substr("requestPayment:fail ".length)), - "function" == typeof fail && fail(); - } - }); - }, - /** - * 生命周期函数--监听页面显示 - */ - onShow: function () { - getApp().check_can_share(); - //--先判断会员状态-- - var user_info = getApp().globalData.userInfo; - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { - wx.navigateTo({ url: '/pages/togoin/togoin', }) - return false; - } - - this.exchange(); - this.detaileds(); - wx.setNavigationBarTitle({ - title: "我的积分", - }) - - //要实时获取开关是显示 - var th=this; - getApp().getConfig2(function(ee){ - var json_d = JSON.parse(ee.switch_list); - th.setData({ is_show_jfcz: json_d.jfcz_switch }); - },1) - - }, - - - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide: function () { - - }, - - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh: function () { - - }, - - - /** - * 用户点击右上角分享 - */ - onShareAppMessage: function () { getApp().globalData.no_clear=1 - - }, - - //订阅消息提醒 - sendsm:function(func) - { - var template_id = this.data.template_id; - // //授权订阅 - wx.requestSubscribeMessage({ - tmplIds: [template_id], - success(res) { - func(); - }, - fail(res) { - func(); - } - }) - - }, -}) \ No newline at end of file diff --git a/pages/user/integral/integral.json b/pages/user/integral/integral.json deleted file mode 100644 index 8835af0..0000000 --- a/pages/user/integral/integral.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "usingComponents": {} -} \ No newline at end of file diff --git a/pages/user/integral/integral.wxml b/pages/user/integral/integral.wxml deleted file mode 100644 index e980d75..0000000 --- a/pages/user/integral/integral.wxml +++ /dev/null @@ -1,98 +0,0 @@ - - - - - 账户积分 - - {{filter.getNum(number)}}积分 - - - - - - - - 积分明细 - - - 积分充值 - - - - - 积分收支明细 - - - - 更多 - - - - - - - - - - {{details.Remark}} - {{details.BillDate}} - - - - {{(details.InOutInt>0)?"+":""}}{{filter.getNum(details.InOutInt)}}积分 - - - - - - - - - - - - - - - - {{filter.getval(result.ToSum,2)}} - - - 充值{{result.Integral}}积分 - 立即充值 - - - - - - - - - - - - 充值{{integral}}积分 - - ¥ - {{filter.getval(money,2)}} - - - - - 购买数量 - - - - - - - {{val}} - - - - - - - - - \ No newline at end of file diff --git a/pages/user/integral/integral.wxss b/pages/user/integral/integral.wxss deleted file mode 100644 index 9fec40e..0000000 --- a/pages/user/integral/integral.wxss +++ /dev/null @@ -1,469 +0,0 @@ -/* pages/yhq/yhq.wxss */ - -.money { - background-image: url(https://mshopimg.yolipai.net/miniapp/images/user/redbg.jpg); - color: #fff; - padding: 40rpx; - font-size: 28rpx; - text-align: left; -} - -.mt1 { - width: 80%; -} - -.mt10 { - margin-top: 20rpx !important; - width: 80%; -} - - - -.top { - display: flex; - flex-direction: row; - width: 100%; - min-height: 70rpx; - color: #000; - line-height: 70rpx; - text-align: center; - font-size: 28rpx; - border-bottom: 20rpx solid #eee; -} - -.tyi { - background-color: bisque; - flex: 1; - min-height: 90rpx; - color: #000; - line-height: 90rpx; - text-align: center; -} - -.ter { - background-color: white; - flex: 1; - min-height: 90rpx; - color: #000; - line-height: 90rpx; -} - -.tsan { - background-color: blue; - flex: 1; - min-height: 90rpx; - color: #000; - line-height: 90rpx; -} - -.tsan { - background-color: brown; - flex: 1; - min-height: 90rpx; - color: #000; - line-height: 90rpx; -} - -.tsi { - background-color: yellowgreen; - flex: 1; - min-height: 90rpx; - color: #000; - line-height: 90rpx; -} - -.swiper-tab { - width: 100%; - border-bottom: 2rpx solid #777; - text-align: center; - line-height: 80rpx; -} - -.swiper-tab-list { - font-size: 30rpx; - display: inline-block; - width: 100%; - color: #777; -} -.jfmx-rim{ - width: 50%; - height: auto; - text-align: center; - border-right:3rpx solid #eeeeee; -} -.on { - - border-bottom: 5rpx solid red; - width: 90%; - -} - -.swiper-box { - display: block; - height: 100%; - width: 100%; - overflow: hidden; -} - -.swiper-box view { - text-align: center; -} - -.body { - padding: 20rpx; - display: flex; - border-bottom: 2rpx solid #eee; -} - -.b_left { - width: 60%; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - font-size: 28rpx; - color: #000; -} - -.b_right { - width: 40%; - text-align: right; - font-size: 28rpx; -} - -.r_img image { - width: 12rpx; - height: 24rpx; - margin-left: 20rpx !important; -} - -.cen { - display: flex; - padding: 10rpx 20rpx; -} - -.c_left { - font-size: 28rpx; - color: #000; - width: 60%; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - text-align: left; -} - -/* .c_left_top{ - -} */ - -.c_left_bottom { - color: #999; - font-size: 24rpx; - line-height: 30rpx; - margin-top: 20rpx; -} - -.c_right { - color: green; - margin-top: 10px; - width: 40%; - text-align: right; -} - -/* 充值【】 */ - -.jfcz1 { - background: url(https://mshopimg.yolipai.net/miniapp/images/user/jfzyc1.png); - text-align: center; - padding: 20px 0; - font-size: 18px; - color: #fff; - margin: 20px 2% 0 0; - width: 90%; - background-size:720rpx; - vertical-align: top; - display: inline-block; - margin-left: 30rpx; -} -.jian{ - width:189rpx; -height:268rpx; -margin-top:-122rpx; -margin-left:5rpx; -} -.jia{ -width:204rpx; -height:266rpx; -margin-top:-119rpx; -margin-left:-98rpx; - -} -.f_big - { - margin-top: 15rpx; - width:125rpx; - height: 65rpx; - font-size: 60rpx; - font-family: 'SimHei',Arial; -} -.money-rim{ - display: flex; -} -.rbm{ - width: 35rpx; - margin-left:250rpx; - padding-top: 30rpx; - height: auto; -} -.tosum{ - text-align: center; - display: flex; - width: 100%; - height: auto; -} - -.mb20 { - margin-bottom: 20px; - font-size:33rpx; - -} - -.jf_btn { - background-color: #c4182e; - display: inline-block; - height: 50px; - line-height: 50px; - width: 80%; - margin: auto; - border-radius: 4px; - text-align: center; -} - -/* 弹出框的大边框 */ - -.big-rim { - width: 100%; - height: 440rpx; -} - -/* 关闭的边框 */ - -.gb-rim { - padding-top: 30rpx; - width: 65rpx; - height: 65rpx; - margin-left: 675rpx; -} - -/* 关闭的图片 */ - -.imag { - width: 60rpx; - height: 60rpx; -} - -/* 购买数量边框 */ - -.shul-rim { - display: flex; - width: 100%; - height: 110rpx; - border-top: 3rpx solid #e8e8e8; -} - -/* 购买数量 */ - -.gmsl { - font-style: normal; - width: 350rpx; - height: 110rpx; - font-size: 25rpx; - padding-top: 25rpx; - padding-left: 30rpx; - line-height:110rpx; - -} - -/* 减的边框 */ - -.reduce { - margin: 40rpx 10rpx; - width: 60rpx; - height: 60rpx; - background-size:20px; - background-color: #000; - overflow: hidden; - border-radius: 8rpx; - margin-left:40rpx; - -} - -/* 减的边框 */ - -.reduce_two { - margin: 36rpx 10rpx; - width:60rpx; - height: 60rpx; - background-size:20px; - background-color: #000; - overflow: hidden; - border-radius: 8rpx; -} - -/* 圆里的值 */ - -.zhi { - height: 55rpx; - line-height: 55rpx; - display: block; - color: #7f7e88; - text-align: center; -} - -/* 充1000送100的边框 */ - -.bk { - margin-left: 20rpx; - height: 108; - width: 100%; -} - -/* 充1000送100 */ - -.text { - width: 300rpx; - font-size: 40rpx; - font-family: 'SimHei', Arial; - -} -/* 充值边框头部 */ -.cz-rim{ - width: 70%; - height: 115rpx; - margin-bottom: 30rpx; - margin-left:44rpx; - margin-top:-40rpx; - -} - -/* ¥ */ - -.fh { - display: inline-block; - width: 26rpx; - height: 35rpx; - font-size: 30rpx; - color: red; - -} - -/* 100 */ - -.value { - color: red; - display: inline-block; - width: 90rpx; - height: 45rpx; - font-size: 40rpx; - font-family: 'SimHei', Arial; -} - -/* 买多少张票的输入框 */ - -.input_box { - width: 120rpx; - height:80rpx; - margin:25rpx 0rpx; - border:2rpx solid #DADADA; -} -.box{ - width:80rpx; - height:60rpx; - text-align: center; - vertical-align: middle; - margin:10rpx 23rpx; - -} - -/* 按钮 */ - -.button { - width: 90%; - height: 85rpx; - margin-left: 20rpx; - margin-top: 30rpx; - font-size: 25rpx; - color: #fff; - background-color: #c4182e; - font-family: 'SimHei', Arial; - text-align: center; -line-height:85rpx; - -} - -.mask { - width: 100%; - height: 100%; - position: fixed; - top: 0; - left: 0; - background: #000; - z-index: 9000; - opacity: 0.1; -} - -.modalDlg { - position: fixed; - z-index: 9999; - background-color: #fff; - border-radius: 10rpx; - flex-direction: column; - align-items: center; - bottom: 0; - left: 0; -} - -/*数据列表边框*/ -.data{ - display: flex; - width: 100%; - border-bottom: 1px solid #E8E8E8; - height: 90rpx; -} -/*左边的数据 */ -.left{ - width:70%; - height: 120rpx; - -} -/* 单据单号 */ -.left-test{ - margin-left: 30rpx; - padding-top: 10rpx; - font-size: 25rpx; - color: #000000; - width: 100%; -} -/* 单据时间 */ -.time{ - - font-size: 25rpx; - color: #999999; - width: 100%; -} -/* 流动积分的加减 */ -.val{ - padding-top:20rpx; - padding-right:20rpx; - height: 70rpx; - width: 175rpx; - font-size: 27rpx; - font-family: 'SimHei',Arial; - text-align:right; - float: right - -} -/* .更多 */ -.gd{ - color: #999999; - font-size: 25rpx; -} \ No newline at end of file diff --git a/pages/user/integral/msg/msg.js b/pages/user/integral/msg/msg.js deleted file mode 100644 index 8751640..0000000 --- a/pages/user/integral/msg/msg.js +++ /dev/null @@ -1,111 +0,0 @@ -// pages/user/member/bring/msg/msg.js -var t = getApp(),o = t.globalData.setting,os = o; -Page({ - - /** - * 页面的初始数据 - */ - data: { - // timer: '',//定时器名字 - // countDownNum: '3'//倒计时初始值 - iurl: o.imghost, - }, - - - /** - * 生命周期函数--监听页面加载 - */ - onLoad: function (options) { - - }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady: function () { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow: function () { - getApp().check_can_share(); - - wx.setNavigationBarTitle({ - title: "支付成功", - }) - }, - // countDown: function () { - // let that = this; - // let countDownNum = that.data.countDownNum;//获取倒计时初始值 - // //如果将定时器设置在外面,那么用户就看不到countDownNum的数值动态变化,所以要把定时器存进data里面 - // that.setData({ - // timer: setInterval(function () {//这里把setInterval赋值给变量名为timer的变量 - // //每隔一秒countDownNum就减一,实现同步 - // countDownNum--; - // //然后把countDownNum存进data,好让用户知道时间在倒计着 - // that.setData({ - // countDownNum: countDownNum - // }) - // //在倒计时还未到0时,这中间可以做其他的事情,按项目需求来 - // if (countDownNum == 0) { - // //这里特别要注意,计时器是始终一直在走的,如果你的时间为0,那么就要关掉定时器!不然相当耗性能 - // //因为timer是存在data里面的,所以在关掉时,也要在data里取出后再关闭 - // clearInterval(that.data.timer); - // //关闭定时器之后,可作其他处理codes go here - // //--跳到绑定页面-- - // wx.navigateTo({ - // url: '../../../integral/jf', - // }) - // } - // }, 500) - // }) - - click:function(){ - wx.redirectTo({ - url: '../integral', - }) - }, - homepage:function(){ - - wx.navigateTo({ - url: "../../index/index", - }) - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide: function () { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload: function () { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh: function () { - - }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom: function () { - - }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage: function () { getApp().globalData.no_clear=1 - - } -}) \ No newline at end of file diff --git a/pages/user/integral/msg/msg.json b/pages/user/integral/msg/msg.json deleted file mode 100644 index 8835af0..0000000 --- a/pages/user/integral/msg/msg.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "usingComponents": {} -} \ No newline at end of file diff --git a/pages/user/integral/msg/msg.wxml b/pages/user/integral/msg/msg.wxml deleted file mode 100644 index 819e186..0000000 --- a/pages/user/integral/msg/msg.wxml +++ /dev/null @@ -1,12 +0,0 @@ - - - - -充值成功 -及时跟进订单信息哟! - - -继续购物 -返回首页 - - diff --git a/pages/user/integral/msg/msg.wxss b/pages/user/integral/msg/msg.wxss deleted file mode 100644 index 5e8634a..0000000 --- a/pages/user/integral/msg/msg.wxss +++ /dev/null @@ -1,82 +0,0 @@ -/* 边框 */ -.rim{ - width: 100%; - height: auto; - text-align: center; - -} - -.imgs{ - width:100rpx; - height:100rpx; - margin-top:20rpx; - margin-left:122rpx; - -} -/* 图片 */ -.img{ - width:110rpx; - height:110rpx; - margin: 40rpx 200rpx; - margin-right:60rpx; - -} -.zhon{ - width: 100%; - height: 168rpx; - margin-top:-20rpx; - -} -.czcg{ - width: 250rpx; - height: 135rpx; - color: #c4182e; - font-size: 50rpx; - font-family: 'SimHei',Arial; - margin-left:243rpx; - padding-top:20px; - - -} -/* 倒计时 */ -.itme{ - margin-top: -40rpx; - - width: 100%; - height: 50rpx; - color: #999; - font-family: 'SimHei',Arial; - font-size: 35rpx; -} -/* 按钮的边框 */ -.click{ - display: flex; - width: 100%; - height: 80rpx; -} -/* 返回上一页 */ -.top{ - margin-top: 30rpx; - background: #c4182e; - color: #fff; - text-align: center; - width: 45%; - height: 75rpx; - line-height: 75rpx; - border-radius:5px; - margin-left: 20rpx; - font-size: 32rpx; -} -.hom-page{ - margin-top: 30rpx; - font-size: 32rpx; - background: #c4182e; - color: #fff; - text-align: center; - width: 45%; - height:75rpx; - line-height: 75rpx; - border-radius:5px; - margin-left: 40rpx; -} - diff --git a/pages/user/integral/query/index.js b/pages/user/integral/query/index.js deleted file mode 100644 index db4d829..0000000 --- a/pages/user/integral/query/index.js +++ /dev/null @@ -1,242 +0,0 @@ -var t = getApp(), - a = t.request, - o = t.globalData.setting, - os = o, - i = require("../../../../utils/util.js"), - ut = i, - s = require("../../../../utils/common.js"); -var regeneratorRuntime = require('../../../../utils/runtime.js'); -Page({ - data: { - - val: false, - color: "", - details: [], //数据 - isBind: true, //控制清空时间日期的按钮 - isBinds: true, - select: false, //下拉框控制器 - grade_name: '全部', //下拉框参数 - grades: [ - "全部", - '支出', - '收入', - ], - datet: "", - dates: "", - result: [], - money: 0, - oddNumbers: "", - pageSize: 10, - page: 1, - current_page: 0, - //is_no_more: 0, - }, - - - /** - * 生命周期函数--监听页面显示 - */ - onShow: function (options) { - wx.setNavigationBarTitle({ - title: "积分明细", - }) - this.init(); - }, - //监听输入框显示清空按钮 - watchPassWord: function(event) { - console.log("监听输入框显示清空按钮"); - var val = event.detail.value; - console.log("是什么", val); - if (val != "" && val != null) { - var isBind = false; - this.setData({ - isBind: isBind - }); - - } - }, - /** - * 点击下拉框 - */ - bindShowMsg() { - console.log(!this.data.select); - this.setData({ - select: !this.data.select - }) - }, - /** - * 已选下拉框 - */ - mySelect(e) { - console.log(e) - var name = e.currentTarget.dataset.name - this.setData({ - grade_name: name, - select: false - }) - }, - /** - * 生命周期函数--监听页面加载 - */ - onLoad: function(options) { - - }, - //明细查询 - Gettime: function (e) { - var page = 0; - //开始获取时间 - var th = this; - var datet= th.data.datet; - var dates= th.data.dates; - console.log(datet, "开始结束", dates); - //删除字符中的—— - var datatk = datet.replace(/[-]/g, ""); - //转换类型 - var datak = parseInt(datatk); - //删除字符中的—— - var dataj = dates.replace(/[-]/g, ""); - //转换类型 - var dataj = parseInt(dataj); - - // if (typeof(BeginDate)!="undefined"){ - // //删除字符中的—— - // var datatk = BeginDate.replace(/[-]/g, ""); - // //转换类型 - // datak = parseInt(datatk); - // console.log(typeof datak, "开始数据类型", datak) - // } - - // if (typeof(EndDate)!="undefined") { - // //删除字符中的—— - // var dataj = EndDate.replace(/[-]/g, ""); - // //转换类型 - // dataj = parseInt(dataj); - // console.log(typeof dataj, "结束据类型", dataj) - // } - console.log("开始", datak, "结束", dataj); - //判断初始时间小于结束时间 - if (datak > dataj) { - console.log("开始时间", datak, '结束时间', dataj, "时间判断"); - getApp().showWarning("结束时间错误"); - this.setData({ details: [] }); - } else { - this.setData({ details: [] }); - console.log(datak, dataj, "时间判断2"); - console.log("有进来吗", datet, dates); - this.setData({ current_page: 0 }); - this.init(); - } - - }, - - async init() { - // if (this.data.is_no_more) return; - this.data.current_page++; - var BeginDate = this.data.datet; - var EndDate = this.data.dates; - var user_id = getApp().globalData.user_id; - var store_id = os.stoid; - var tpye = this.data.grade_name; - console.log("是是啊", tpye); - var e = this, - details = ""; - var get_data = { - user_id: user_id, store_id: store_id, - pageSize: 10, page: e.data.current_page - }; - // 判断下拉框,添加类型 - if (tpye == "全部") { - console.log("全部", tpye); - get_data.FInregral = null; - } else if (tpye == "支出") { - console.log("支出"); - get_data.FInregral = 0; - } else { - console.log("收入"); - get_data.FInregral = 1; - } - if (EndDate != "" && EndDate != null) { - get_data.EndDate = EndDate; - } - - if (BeginDate != "" && BeginDate!= null) { - get_data.BeginDate = BeginDate; - } - var big_arr = this.data.details; - await getApp().request.promiseGet("/api/weshop/users/listPoints", { - data: get_data, isShowLoading: 1 - }).then(res => { - - var details = res.data; - - - - - if (!details.data || details.data.pageData.length == 0) { - // this.data.is_no_more = 1; - getApp().showWarning("未找更多数据"); - return false; - } - - var details = details.data.pageData; - - - details.forEach(function (val, ind) { - big_arr.push(val); - }) - setTimeout(() => { - this.setData({ - details: big_arr - }); - }, 1500) - - - }) - }, - //---加载更多是靠这个函数---- - // onReachBottom: function () { - // console.log("加载"); - // this.init(); - - // }, - - //起始时间 - bindDateChenge: function(e) { - console.log("是什么", e.detail.value); - var isBind = false; - this.setData({ - datet: e.detail.value, - isBind: isBind - }); - }, - // 结束时间 - bindDateChenges: function(e) { - console.log("是什么", e.detail.value); - var isBinds = false; - this.setData({ - dates: e.detail.value, - isBinds: isBinds - }); - }, - //catchtap阻止冒泡,点击清除开始时间的按钮 - eliminate: function() { - console.log("试试"); - var isBind = true; - var data = ""; - this.setData({ - datet: data, - isBind: isBind - }) - }, - //catchtap阻止冒泡,点击清除结束时间的按钮 - eliminates: function() { - console.log("试试"); - var isBinds = true; - var dates = ""; - this.setData({ - dates: dates, - isBinds: isBinds - }) - } - -}) \ No newline at end of file diff --git a/pages/user/integral/query/index.json b/pages/user/integral/query/index.json deleted file mode 100644 index 9e26dfe..0000000 --- a/pages/user/integral/query/index.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/pages/user/integral/query/index.wxml b/pages/user/integral/query/index.wxml deleted file mode 100644 index 9f291dc..0000000 --- a/pages/user/integral/query/index.wxml +++ /dev/null @@ -1,71 +0,0 @@ - - - -
- - 日期: - - - - {{datet}} - - - - - - - - - {{dates}} - - - - - - - 查询内容 - - - - {{grade_name}} - - - - - - - - {{item}} - - - - - -
- 注:读取时段内近10笔记录 -
- - - 项目 - 积分 - - - - - - - - {{details.Remark}} - {{details.BillDate}} - - - - {{(details.InOutInt>0)?"+":""}}{{filter.getNum(details.InOutInt)}}积分 - - - - \ No newline at end of file diff --git a/pages/user/integral/query/index.wxss b/pages/user/integral/query/index.wxss deleted file mode 100644 index 55d080a..0000000 --- a/pages/user/integral/query/index.wxss +++ /dev/null @@ -1,323 +0,0 @@ -/* 大边框 */ -.big-rim{ - margin-top: 15rpx; - width: 100%; - height: 345rpx; - 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; - } - /* 底部边框线 - .bottom{ - width: 100%; - border-bottom: 20rpx solid #eeeeee; - } */ - -/*开始时间清空输入框的按钮*/ -.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; -} -/* 优惠券样式 */ -.body{ - text-align: center; - padding: 20rpx; - margin: 20rpx auto; - width: 80%; - max-width: 1000rpx; - font-size: 28rpx; - color: #333333; - border-bottom: 2rpx solid #EEEEEE; -} - -.b_iimg{ - background-color: red; - width: 400rpx; - height: 400rpx; -} - -.b_sz2{ - font-size: 40rpx; - color: #6fd137; - margin: 20rpx 0; - text-align: center; -} - -/* 注释 */ - .zs{ - margin-left: 30rpx; - font-size: 25rpx; - color: #999999; - font-family: 'SimHei',Arial; - margin-top: 42rpx; - margin-bottom: 30rpx; - } - /* 项目边框 */ - .db{ - display: flex; - width: 100%; - height: 85rpx; - border-bottom: 2rpx solid #e8e8e8; - line-height: 85rpx; -} -/* 项目 */ -.xm{ -margin-left: 30rpx; - height:50rpx; - font-size: 30rpx; -color: #999999; -width: 50%; -vertical-align: middle; -} -/* 金额 */ -.je{ -text-align: right; -padding-right:30rpx; -height: 50rpx; - font-size: 30rpx; -color: #999999; -width: 50%; -vertical-align: middle; - -} - -/*数据*/ -.data{ - display: flex; - width: 100%; - border-bottom: 1px solid #E8E8E8; - height: 95rpx; -} -/*左边的数据 */ -.left{ - width:90%; - height: 120rpx; -} -/* 单据单号 */ -.left-test{ - margin-left: 30rpx; - padding-top: 11rpx; - font-size: 25rpx; - color: #000000; - width: 100%; -} - -/* 流动资金的加减 */ -.val{ - padding-top:20rpx; - padding-right:10rpx; - height: 70rpx; - width: 220rpx; - font-size: 30rpx; - font-family: 'SimHei',Arial; - padding-left:67rpx; - -} \ No newline at end of file diff --git a/pages/user/member/account/account.js b/pages/user/member/account/account.js deleted file mode 100644 index a1eee9d..0000000 --- a/pages/user/member/account/account.js +++ /dev/null @@ -1,185 +0,0 @@ -var t = getApp(), - a = t.request, - o = t.globalData.setting, - os = o, - i = require("../../../../utils/util.js"), - ut = i, - s = require("../../../../utils/common.js"); -var regeneratorRuntime = require('../../../../utils/runtime.js'); -Page({ - data: { - details:[],//数据 - isBind:true,//控制清空时间日期的按钮 - isBinds: true, - height: '', - pageSize: 10, - page: 1, - height: '', - datet:"", - dates:"", - current_page:0, - is_no_more:0, - }, - //监听输入框显示清空按钮 - watchPassWord: function (event) { - console.log("监听输入框显示清空按钮"); - var val = event.detail.value; - console.log("是什么", val); - if (val != "" && val != null) { - var isBind = false; - this.setData({ isBind: isBind }); - - } - }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady: function () { - - }, - //明细查询 - Gettime:function(e){ - var page= 0; - //开始获取时间 - var th=this; - var stime = th.data.datet; - var etime = th.data.dates; - - console.log(stime, "开始结束" + etime ); - //开始获取时间结束 - console.log(stime, "结束开始", etime); - //删除字符中的—— - var datatk = stime.replace(/[-]/g,""); - console.log("aaa", datak); - var dataj = etime.replace(/[-]/g, ""); - console.log("开始", datatk, "结束", dataj); - //转换类型 - var datak = parseInt(datatk); - var dataj = parseInt(dataj); - console.log("sk", datak, "js", dataj); - //判断初始时间小于结束时间 - if(datak>dataj){ - console.log("开始时间",datak,'结束时间',dataj,"时间判断",); - getApp().showWarning("结束时间错误"); - }else{ - console.log(datak, dataj, "时间判断2"); - console.log("有进来吗", stime, etime); - this.setData({ details: []}); - console.log("页数",this.data.page); - this.setData({ current_page: 0 }); - this.lsmx(); - } - - }, - //流水明细 - async lsmx() { - //if(this.data.is_no_more) return; - this.data.current_page++; - var stime = this.data.datet; - var etime = this.data.dates; - var user_id = getApp().globalData.user_id; - var store_id = os.stoid; - var e = this, - details = ""; - var get_data = { - user_id: user_id, store_id: store_id, - pageSize:10, page: e.data.current_page - }; - - if (etime != "" && etime != null) { - get_data.etime = etime; - } - - if (stime != "" && stime != null) { - get_data.stime = stime; - } - var big_arr=this.data.details; - - await getApp().request.promiseGet("/api/weshop/users/pageLiuDonGreCord", { - data: get_data, isShowLoading:1 - }).then(res => { - var details = res.data; - - if (!details || !details.data || !details.data.pageData || details.data.pageData.length== 0){ - this.data.is_no_more=1; - getApp().showWarning("未找更多数据"); - - return false; - } - - var details=details.data.pageData; - // console.log("不空", details); - // console.log("长度", details.length); - details.forEach(function(val,ind){ - big_arr.push(val); - }) - setTimeout(() => { - this.setData({ - details: big_arr - }); - }, 1500) - - - }) - }, - /** - * 生命周期函数--监听页面加载 - */ - onLoad: function (options) { - - }, - onShow: function () { - - this.lsmx(); - wx.setNavigationBarTitle({ - title: "流动资金明细 ", - }); - wx.getSystemInfo({ - success: (details) => { - this.setData({ - height: details.windowHeight - }) - } - }) - - }, - // //---加载更多是靠这个函数---- - // onReachBottom: function () { - - // this.lsmx(); - - // }, - - - //起始时间 - bindDateChenge: function(e) { - console.log("是什么", e.detail.value); - var isBind = false; - this.setData({ - datet: e.detail.value, isBind: isBind - }); - }, - // 结束时间 - bindDateChenges: function(e) { - console.log("是什么", e.detail.value); - var isBinds = false; - this.setData({ - dates: e.detail.value, isBinds: isBinds - }); - }, - //catchtap阻止冒泡,点击清除开始时间的按钮 - eliminate:function(){ - console.log("试试"); - var isBind= true; - var data=""; - this.setData({ datet: data, isBind: isBind}) - }, - //catchtap阻止冒泡,点击清除结束时间的按钮 - eliminates: function () { - console.log("试试"); - var isBinds = true; - var dates = ""; - this.setData({ dates: dates, isBinds: isBinds }) - }, -}) \ No newline at end of file diff --git a/pages/user/member/account/account.json b/pages/user/member/account/account.json deleted file mode 100644 index 9e26dfe..0000000 --- a/pages/user/member/account/account.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/pages/user/member/account/account.wxml b/pages/user/member/account/account.wxml deleted file mode 100644 index 86ee8be..0000000 --- a/pages/user/member/account/account.wxml +++ /dev/null @@ -1,60 +0,0 @@ - - -
- - 日期: - - - - {{datet}} - - - - - - - - - {{dates}} - - - - - -
- 注: 读取时段内近10笔记录 -
- - 项目 - 金额 - - - 没有数据 - - - - - - - - {{(details.type==0?"分成":(details.type==1?"提现-":(details.type==2?"退款-":(details.type==3?"购买-":(details.type==4||details.type==5?"返利-":(details.type==6?"转入-":""))))))}}单号{{details.order_sn}} - - - - - {{dateUtil.dateFormat(details.time)}} - - - - - {{details.type==1||details.type==3?'-':'+'}}{{filter.getNum(details.money)}} - - - - \ No newline at end of file diff --git a/pages/user/member/account/account.wxss b/pages/user/member/account/account.wxss deleted file mode 100644 index 376eee0..0000000 --- a/pages/user/member/account/account.wxss +++ /dev/null @@ -1,226 +0,0 @@ -/* 大边框 */ -.big-rim{ - margin-top: 15rpx; - width: 100%; - height: 275rpx; -border-bottom: 10px solid #EEEEEE; -} -.min-rim{ -display: flex; -width: 100%; -height: auto; - -} -/* 开始时间 */ -.kssj{ -border-radius: 5px; -background-color: #EEEEEE; -border: 1px solid #DADADA; -width:220rpx; -height: 50rpx; -margin-top:5rpx; -margin-left:10rpx; -line-height:40rpx; -} -.kstext{ - padding-bottom: 10rpx; -padding-left: 10rpx; -font-size: 25rpx; -color: #333; -font-family: 'SimHei',Arial; -} -/* 日期 */ -.rq{ - margin-top:12rpx; - font-size:30rpx; - font-family: 'SimHei',Arial; - margin-left:30rpx; - -} -/* 至 */ -.zi{ - margin-top:12rpx; - font-size:30rpx; - font-family: 'SimHei',Arial; - margin-left:20rpx; -} -/* 开始时间 边框 */ -.kspicker{ - position: relative; - top:0rpx; - left: 0rpx; -} -/* 结束时间边框 */ -.jspicker{ -position: relative; - top:0rpx; - left: 0rpx; - margin-left:20rpx; - -} -/* 结束时间 */ -.jssj{ -border-radius:5px; -background-color:#EEEEEE; -border:1px solid #DADADA; -width:220rpx; -height:50rpx; -margin-top:5rpx; -line-height:40rpx -} -.jstext{ - padding-bottom: 10rpx; -padding-left: 10rpx; -font-size: 25rpx; -color: #333; -font-family: 'SimHei',Arial; -} -/* 明细查询 */ -.botton{ - margin-left: 30rpx; - margin-top: 40rpx; - background-color: #C4182E; - width: 92%; - border-radius:10rpx; - text-align: center; - height: 77rpx; - line-height: 77rpx; - color: #FFF; - font-size: 25rpx; - border: none; - font-family: 'SimHei',Arial; - } - /* 注释 */ - .zs{ - margin-left: 30rpx; - font-size: 25rpx; - color: #999999; - margin-top:37rpx; - font-family: 'SimHei',Arial; - } -.db{ - display: flex; - width: 100%; - height: 90rpx; - border-bottom: 2rpx solid #e8e8e8; - line-height: 90rpx; - } - - -/* 项目 */ -.xm{ -margin-left: 30rpx; - height: 100rpx; - font-size: 30rpx; -color: #999999; -width: 50%; -vertical-align: middle; - -} -/* 金额 */ -.je{ - text-align: right; -padding-right:30rpx; - height: 100rpx; - font-size: 30rpx; -color: #999999; -width: 50%; -vertical-align: middle; -} -/* 没有数据 */ -.mysj{ - margin-top: 30rpx; - width: 100%; - height: 70rpx; - font-size: 34rpx; - text-align: center; - color: #888; -} -/*数据*/ -.data{ - display: flex; - width: 100%; - border-bottom: 1px solid #E8E8E8; - height: 114rpx; -} -/*左边的数据 */ -.left{ - width:70%; - height: 120rpx; -} -/* 单据单号 */ -.left-test{ - display: flex; - margin-left: 30rpx; - padding-top: 10rpx; - font-size: 30rpx; - color: #000000; - width: 100%; -} -/* 单据时间 */ -.time{ - margin-top: 10rpx; - font-size: 25rpx; - color: #999999; - width: 100%; - margin-left:34rpx; - -} -/* 流动资金的加减 */ -.money{ - padding-top:20rpx; - height: 70rpx; - width: 120rpx; - margin-left:80rpx; - font-size: 30rpx; - font-family: 'SimHei',Arial; - text-align:right; -} -/*开始时间清空输入框的按钮*/ -.empty{ - position: absolute; - top: 25rpx; - left:316rpx; - -} -/*结束时间清空输入框的按钮*/ -.end{ - width: 25rpx; - height: 25rpx; - border-radius:50%; - background: #767676; - color: #fff; - font-size: 25rpx; - text-align: center; - line-height:19rpx; - - -} -/* 开始 */ -.ksqc{ - width: 25rpx; - height: 25rpx; - border-radius:50%; - background: #767676; - color: #fff; - font-size: 25rpx; - text-align: center; - line-height:19rpx; - -} -.jspc{ - - position:absolute; - top:7rpx; - left:190rpx -} - -/* 单号 */ -.card{ - width: 360rpx; - height: auto; - text-overflow: ellipsis; - white-space:nowrap; - overflow:hidden; - -} \ No newline at end of file diff --git a/pages/user/member/account/index.wxs b/pages/user/member/account/index.wxs deleted file mode 100644 index e247f84..0000000 --- a/pages/user/member/account/index.wxs +++ /dev/null @@ -1,63 +0,0 @@ -var formatNumber = function (n) { - n = n.toString() - return n[1] ? n : '0' + n -} - -var regYear = getRegExp("(y+)", "i"); - -var dateFormat = function (timestamp, format) { - if (!format) { - format = "yyyy-MM-dd hh:mm:ss"; - } - timestamp = parseInt(timestamp)*1000;; - var realDate = getDate(timestamp); - function timeFormat(num) { - return num < 10 ? '0' + num : num; - } - var date = [ - ["M+", timeFormat(realDate.getMonth() + 1)], - ["d+", timeFormat(realDate.getDate())], - ["h+", timeFormat(realDate.getHours())], - ["m+", timeFormat(realDate.getMinutes())], - ["s+", timeFormat(realDate.getSeconds())], - ["q+", Math.floor((realDate.getMonth() + 3) / 3)], - ["S+", realDate.getMilliseconds()], - ]; - var reg1 = regYear.exec(format); - // console.log(reg1[0]); - if (reg1) { - - format = format.replace(reg1[1], (realDate.getFullYear() + '').substring(4 - reg1[1].length)); - } - for (var i = 0; i < date.length; i++) { - var k = date[i][0]; - var v = date[i][1]; - - var reg2 = getRegExp("(" + k + ")").exec(format); - if (reg2) { - format = format.replace(reg2[1], reg2[1].length == 1 - ? v : ("00" + v).substring(("" + v).length)); - } - } - return format; -} - - -module.exports = { - dateFormat: dateFormat -}; - - -function parse(fmt) { - - var a = fmt.slice(0, 4); - console.log("a",a); - var b=+"-"; - console.log("b", b); - var c = fmt.slice(5, 7); - var d=+"-"; - console.log("d", d); - var e = fmt.slice(8, 9); - console.log("e", e); - -} \ No newline at end of file diff --git a/pages/user/member/account_unable/account_unable.js b/pages/user/member/account_unable/account_unable.js deleted file mode 100644 index 1943da9..0000000 --- a/pages/user/member/account_unable/account_unable.js +++ /dev/null @@ -1,185 +0,0 @@ -var t = getApp(), - a = t.request, - o = t.globalData.setting, - os = o, - i = require("../../../../utils/util.js"), - ut = i, - s = require("../../../../utils/common.js"); -var regeneratorRuntime = require('../../../../utils/runtime.js'); -Page({ - data: { - details: [],//数据 - isBind: true,//控制清空时间日期的按钮 - isBinds: true, - height: '', - pageSize: 10, - page: 1, - height: '', - datet: "", - dates: "", - current_page: 0, - is_no_more: 0, - }, - //监听输入框显示清空按钮 - watchPassWord: function (event) { - console.log("监听输入框显示清空按钮"); - var val = event.detail.value; - console.log("是什么", val); - if (val != "" && val != null) { - var isBind = false; - this.setData({ isBind: isBind }); - - } - }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady: function () { - - }, - //明细查询 - Gettime: function (e) { - var page = 0; - //开始获取时间 - var th = this; - var stime = th.data.datet; - var etime = th.data.dates; - - console.log(stime, "开始结束" + etime); - //开始获取时间结束 - console.log(stime, "结束开始", etime); - //删除字符中的—— - var datatk = stime.replace(/[-]/g, ""); - console.log("aaa", datak); - var dataj = etime.replace(/[-]/g, ""); - console.log("开始", datatk, "结束", dataj); - //转换类型 - var datak = parseInt(datatk); - var dataj = parseInt(dataj); - console.log("sk", datak, "js", dataj); - //判断初始时间小于结束时间 - if (datak > dataj) { - console.log("开始时间", datak, '结束时间', dataj, "时间判断"); - getApp().showWarning("结束时间错误"); - } else { - console.log(datak, dataj, "时间判断2"); - console.log("有进来吗", stime, etime); - this.setData({ details: [] }); - console.log("页数", this.data.page); - this.setData({ current_page: 0 }); - this.lsmx(); - } - - }, - //流水明细 - async lsmx() { - //if(this.data.is_no_more) return; - this.data.current_page++; - var stime = this.data.datet; - var etime = this.data.dates; - var user_id = getApp().globalData.user_id; - var store_id = os.stoid; - var e = this, - details = ""; - var get_data = { - user_id: user_id, store_id: store_id, - pageSize: 10, page: e.data.current_page - }; - - if (etime != "" && etime != null) { - get_data.etime = etime; - } - - if (stime != "" && stime != null) { - get_data.stime = stime; - } - var big_arr = this.data.details; - - await getApp().request.promiseGet("/api/weshop/users/pageUnablereCord", { - data: get_data, isShowLoading: 1 - }).then(res => { - - var details = res.data; - - if ( !details || !details.data || !details.data.pageData || details.data.pageData.length == 0) { - this.data.is_no_more = 1; - getApp().showWarning("未找更多数据"); - return false; - } - - var details = details.data.pageData; - // console.log("不空", details); - // console.log("长度", details.length); - details.forEach(function (val, ind) { - big_arr.push(val); - }) - setTimeout(() => { - this.setData({ - details: big_arr - }); - }, 1500) - - - }) - }, - /** - * 生命周期函数--监听页面加载 - */ - onLoad: function (options) { - - }, - onShow: function () { - - this.lsmx(); - wx.setNavigationBarTitle({ - title: "不可用资金明细", - }); - wx.getSystemInfo({ - success: (details) => { - this.setData({ - height: details.windowHeight - }) - } - }) - - }, - //---加载更多是靠这个函数---- - // onReachBottom: function () { - - // this.lsmx(); - - // }, - - - //起始时间 - bindDateChenge: function (e) { - console.log("是什么", e.detail.value); - var isBind = false; - this.setData({ - datet: e.detail.value, isBind: isBind - }); - }, - // 结束时间 - bindDateChenges: function (e) { - console.log("是什么", e.detail.value); - var isBinds = false; - this.setData({ - dates: e.detail.value, isBinds: isBinds - }); - }, - //catchtap阻止冒泡,点击清除开始时间的按钮 - eliminate: function () { - console.log("试试"); - var isBind = true; - var data = ""; - this.setData({ datet: data, isBind: isBind }) - }, - //catchtap阻止冒泡,点击清除结束时间的按钮 - eliminates: function () { - console.log("试试"); - var isBinds = true; - var dates = ""; - this.setData({ dates: dates, isBinds: isBinds }) - }, -}) \ No newline at end of file diff --git a/pages/user/member/account_unable/account_unable.json b/pages/user/member/account_unable/account_unable.json deleted file mode 100644 index 8835af0..0000000 --- a/pages/user/member/account_unable/account_unable.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "usingComponents": {} -} \ No newline at end of file diff --git a/pages/user/member/account_unable/account_unable.wxml b/pages/user/member/account_unable/account_unable.wxml deleted file mode 100644 index cb52919..0000000 --- a/pages/user/member/account_unable/account_unable.wxml +++ /dev/null @@ -1,60 +0,0 @@ - - -
- - 日期: - - - - {{datet}} - - - - - - - - - {{dates}} - - - - - -
- 注: 读取时段内近10笔记录 -
- - 项目 - 金额 - - - 没有数据 - - - - - - - - 单号{{details.order_sn}} - - - - - {{dateUtil.dateFormat(details.create_time)}} - - - - - {{details.type==1?'-':'+'}}{{filter.getNum(details.money)}} - - - - diff --git a/pages/user/member/account_unable/account_unable.wxss b/pages/user/member/account_unable/account_unable.wxss deleted file mode 100644 index 3727f39..0000000 --- a/pages/user/member/account_unable/account_unable.wxss +++ /dev/null @@ -1,215 +0,0 @@ -/* 大边框 */ -.big-rim{ - margin-top: 15rpx; - width: 100%; - height: 275rpx; -border-bottom: 10px solid #EEEEEE; -} -.min-rim{ -display: flex; -width: 100%; -height: auto; - -} -/* 开始时间 */ -.kssj{ -border-radius: 5px; -background-color: #EEEEEE; -border: 1px solid #DADADA; -width:220rpx; -height: 50rpx; -margin-top:5rpx; -margin-left:10rpx; -line-height:40rpx; - - -} -.kstext{ - padding-bottom: 10rpx; -padding-left: 10rpx; -font-size: 25rpx; -color: #333; -font-family: 'SimHei',Arial; -} -/* 日期 */ -.rq{ - margin-top:12rpx; - font-size:30rpx; - font-family: 'SimHei',Arial; - margin-left:30rpx; - -} -/* 至 */ -.zi{ - margin-top:12rpx; - font-size:30rpx; - font-family: 'SimHei',Arial; - margin-left:20rpx; -} -/* 开始时间 边框 */ -.kspicker{ - position: relative; - top:0rpx; - left: 0rpx; -} -/* 结束时间边框 */ -.jspicker{ -position: relative; - top:0rpx; - left: 0rpx; - margin-left:20rpx; - -} -/* 结束时间 */ -.jssj{ -border-radius:5px; -background-color:#EEEEEE; -border:1px solid #DADADA; -width:220rpx; -height:50rpx; -margin-top:5rpx; -line-height:40rpx; - -} -.jstext{ - padding-bottom: 10rpx; -padding-left: 10rpx; -font-size: 25rpx; -color: #333; -font-family: 'SimHei',Arial; -} -/* 明细查询 */ -.botton{ - margin-left: 30rpx; - margin-top: 40rpx; - background-color: #C4182E; - width: 92%; - border-radius:10rpx; - text-align: center; - height: 77rpx; - line-height: 77rpx; - color: #FFF; - font-size: 25rpx; - border: none; - font-family: 'SimHei',Arial; - } - /* 注释 */ - .zs{ - margin-left: 30rpx; - font-size: 25rpx; - color: #999999; - margin-top:37rpx; - font-family: 'SimHei',Arial; - } -.db{ - display: flex; - width: 100%; - height: 90rpx; - border-bottom: 2rpx solid #e8e8e8; - line-height: 90rpx; - } - - -/* 项目 */ -.xm{ -margin-left: 30rpx; - height: 100rpx; - font-size: 30rpx; -color: #999999; -width: 50%; -vertical-align: middle; - -} -/* 金额 */ -.je{ - text-align: right; -padding-right:30rpx; - height: 100rpx; - font-size: 30rpx; -color: #999999; -width: 50%; -vertical-align: middle; -} -/* 没有数据 */ -.mysj{ - margin-top: 30rpx; - width: 100%; - height: 70rpx; - font-size: 34rpx; - text-align: center; - color: #888; -} -/*数据*/ -.data{ - display: flex; - width: 100%; - border-bottom: 1px solid #E8E8E8; - height: 114rpx; -} -/*左边的数据 */ -.left{ - width:70%; - height: 120rpx; -} -/* 单据单号 */ -.left-test{ - margin-left: 30rpx; - padding-top: 20rpx; - font-size: 30rpx; - color: #000000; - width: 100%; -} -/* 单据时间 */ -.time{ - margin-top: 10rpx; - font-size: 25rpx; - color: #999999; - width: 100%; -} -/* 流动资金的加减 */ -.money{ - padding-top:20rpx; - height: 70rpx; - width: 120rpx; - margin-left:80rpx; - font-size: 30rpx; - font-family: 'SimHei',Arial; - text-align:right; -} -/*开始时间清空输入框的按钮*/ -.empty{ - position: absolute; - top: 25rpx; - left:316rpx; - -} -/*结束时间清空输入框的按钮*/ -.end{ - width: 25rpx; - height: 25rpx; - border-radius:50%; - background: #767676; - color: #fff; - font-size: 25rpx; - text-align: center; - line-height:19rpx; - - -} -/* 开始 */ -.ksqc{ - width: 25rpx; - height: 25rpx; - border-radius:50%; - background: #767676; - color: #fff; - font-size: 25rpx; - text-align: center; - line-height:19rpx; - -} -.jspc{ - position:absolute; - top:7rpx; - left:190rpx -} \ No newline at end of file diff --git a/pages/user/member/account_unable/index.wxs b/pages/user/member/account_unable/index.wxs deleted file mode 100644 index e247f84..0000000 --- a/pages/user/member/account_unable/index.wxs +++ /dev/null @@ -1,63 +0,0 @@ -var formatNumber = function (n) { - n = n.toString() - return n[1] ? n : '0' + n -} - -var regYear = getRegExp("(y+)", "i"); - -var dateFormat = function (timestamp, format) { - if (!format) { - format = "yyyy-MM-dd hh:mm:ss"; - } - timestamp = parseInt(timestamp)*1000;; - var realDate = getDate(timestamp); - function timeFormat(num) { - return num < 10 ? '0' + num : num; - } - var date = [ - ["M+", timeFormat(realDate.getMonth() + 1)], - ["d+", timeFormat(realDate.getDate())], - ["h+", timeFormat(realDate.getHours())], - ["m+", timeFormat(realDate.getMinutes())], - ["s+", timeFormat(realDate.getSeconds())], - ["q+", Math.floor((realDate.getMonth() + 3) / 3)], - ["S+", realDate.getMilliseconds()], - ]; - var reg1 = regYear.exec(format); - // console.log(reg1[0]); - if (reg1) { - - format = format.replace(reg1[1], (realDate.getFullYear() + '').substring(4 - reg1[1].length)); - } - for (var i = 0; i < date.length; i++) { - var k = date[i][0]; - var v = date[i][1]; - - var reg2 = getRegExp("(" + k + ")").exec(format); - if (reg2) { - format = format.replace(reg2[1], reg2[1].length == 1 - ? v : ("00" + v).substring(("" + v).length)); - } - } - return format; -} - - -module.exports = { - dateFormat: dateFormat -}; - - -function parse(fmt) { - - var a = fmt.slice(0, 4); - console.log("a",a); - var b=+"-"; - console.log("b", b); - var c = fmt.slice(5, 7); - var d=+"-"; - console.log("d", d); - var e = fmt.slice(8, 9); - console.log("e", e); - -} \ No newline at end of file diff --git a/pages/user/member/bring/bring.js b/pages/user/member/bring/bring.js deleted file mode 100644 index 8e1bb94..0000000 --- a/pages/user/member/bring/bring.js +++ /dev/null @@ -1,413 +0,0 @@ -var t = getApp(), - a = t.request, - o = t.globalData.setting, - os = o, - i = require("../../../../utils/util.js"), - ut = i, - s = require("../../../../utils/common.js"); -var regeneratorRuntime = require('../../../../utils/runtime.js'); -var oo = t.globalData.setting; -Page({ - /** - * 页面的初始数据 - */ - data: { - usernames: null, - val: null, //提现金额内容 - current: 1, //单选框判断的参数 - user_money: 0, //可提现余额 - // money:0,//提现金额 - account_bank: "", //银行卡号 - bank_name: "", //银行名字 - button: 0, //按钮样式控制器、 - submit: null, //点击控制器 - weixin: 0, - cardInfo: '', - user_infor: {}, //获取初始对象 - needmon:0, - distribut_min:0 - }, - // 银行卡失去焦点事件 - blurInputEvent: function(e) { - var inputvalue = e.detail.value.length; - if (inputvalue > 14) { - var value = e.detail.value; - var account_bank = value.replace(/\s+/g, ""); - this.yhk(account_bank); - - } - - }, - /** 获取提现输入框的值 bindinput='genre' */ - money: function(e) { - this.setData({ - money: Number(e.detail.value) - }) - }, - // 单选框控制器 - onClickItem(e) { - console.log(" 单选框控制器", e.currentTarget.dataset.idx) //获取自定义的值 - let idx = e.currentTarget.dataset.idx; - this.setData({ - current: idx - }) - - }, - /*点击确定提现后表现的形式*/ - Gettime: function(e) { - var user_money = this.data.user_money; - var money = e.detail.value.moneys; //typeof判断数据类型 - var current = this.data.current; - var money = Number(money); - - if (user_money money){ - getApp().showWarning("提现需大于"+this.data.distribut_min+"元"); - return false; - - } - if (Number(user_money) < Number(money)) { - console.log(money + "有qq吗" + user_money + typeof this.data.money); - getApp().showWarning("提现金额大于余额"); - return false; - - } else if (money > 0 || user_money >= money && user_money > 99) { - if (current == 1) { - console.log(user_money + "有进来吗eeee" + money); - // 获取输入框中的值 - var moneys = e.detail.value.moneys; //钱 - var cardname = this.data.bank_name; //卡名 - var userName = e.detail.value.userName; //名字 - var card = e.detail.value.card; //卡号 - - - if (card.length < 15) { - getApp().showWarning("卡号错误"); - this.setData({ - bank_name: "", - usernames: "" - }); - return false; - } - console.log("钱", moneys, "卡", cardname, "名字", userName, "卡的长度", card.length); - var len = userName.length; //名字的长度 - if (userName.indexOf(" ") >= 0) { - getApp().showWarning("名字不能有空"); - return false; - - } - - - console.log("字符串的长度", len); - if (this.data.current == 1) { - if (cardname == null || cardname == "") { - getApp().showWarning("银行卡不存在"); - return false; - - } - if (userName == "" || userName == null) { - getApp().showWarning("名字不能为空"); - return false; - } - if (len < 2) { - getApp().showWarning("名字错误"); - return false; - } - if (!/^[\u4e00-\u9fa5]+$/i.test(userName)) { - getApp().showWarning("您输入不是中文"); - return false; - } - - } - var that = this; - //控制器参数 - var user_id = getApp().globalData.user_id; - var store_id = os.stoid; - - var current = that.data.current; - var userName = e.detail.value.userName; //名字 - console.log('微信余额名字', userName, "控制器", current); - this.data.user_infor.money = moneys; - this.data.user_infor.user_id = user_id; - this.data.user_infor.store_id = store_id; - this.data.user_infor.account_name = userName; - this.data.user_infor.account_bank = card; - this.data.user_infor.bank_name = cardname; - this.data.user_infor.bank_type = this.data.current; - var user_infor = this.data.user_infor; - this.Cashwithdrawal(user_infor) - } else { - var userName = e.detail.value.userName; //名字 - var len = userName.length; //名字的长度 - if (userName.indexOf(" ") >= 0) { - getApp().showWarning("名字不能有空"); - return false; - - } - if (userName == "" || userName == null) { - getApp().showWarning("名字不能为空"); - return false; - } - if (len < 2) { - getApp().showWarning("名字错误"); - return false; - } - if (!/^[\u4e00-\u9fa5]+$/i.test(userName)) { - getApp().showWarning("您输入不是中文"); - return false; - } - var moneys = e.detail.value.moneys; //钱 - var user_id = getApp().globalData.user_id; - var store_id = os.stoid; - var len = userName.length; - this.data.user_infor.money = moneys; - this.data.user_infor.user_id = user_id; - this.data.user_infor.store_id = store_id; - this.data.user_infor.account_name = userName; - this.data.user_infor.bank_type = this.data.current; - var user_infor = this.data.user_infor; - - console.log("控制器2", user_infor); - this.Cashwithdrawal(user_infor); - } - } else { - console.log( "提现金额小于",this.data.distribut_min); - getApp().showWarning("提现金额小于"+this.data.distribut_min); - - - } - }, - - // 提现 - Cashwithdrawal: function(user_infor) { - delete user_infor.rmon; - delete user_infor.isck; - delete user_infor.needmon; - delete user_infor.liudong_money; - delete user_infor.distribut_min; - delete user_infor.type; - - user_infor.source_type=1; - var str = JSON.stringify(user_infor); - // wx.showLoading({ title: "加载中" }); - wx.request({ - url: oo.url + '/api/weshop/users/saveWithdrawals', - data: str, - method: 'POST', - header: { - 'content-type': 'application/json' - }, // 设置请求的 header - success: function(res) { - if (res.data.code != -1) { - wx.navigateTo({ - url: 'msg/msg', - }) - } else { - getApp().showWarning("提现金额不足"); - } - }, - fail: function() { - getApp().showWarning("出现错误"); - }, - - - }) - - }, - - // 初始化判断微信余额 - async weixin() { - var user_id = getApp().globalData.user_id; - var store_id = os.stoid; - await getApp().request.promiseGet("/api/weshop/users/getWithdrawals", { - data: { - user_id: user_id, - store_id: store_id - } - }).then(res => { - var a = res.data; - var user_infor = a.data; - var user_money = user_infor.liudong_money; - var distribut_min=user_infor.distribut_min; - console.log( user_money,distribut_min,user_infor, "初始化出来的数据", a.data.account_bank); - if (user_money > distribut_min) { - this.setData({ - submit: "submit", - button: user_money, - user_money: user_money, - distribut_min: distribut_min - }); - - } else { - this.setData({ - submit: " ", - button: user_money, - user_money:user_money, - distribut_min: distribut_min - }) - } - console.log(typeof user_money, "ooo" + user_money); - if (a.code != -1) { - this.setData({ - user_infor: user_infor, - - }); - if (a.data.account_bank != null) { - var account_bank = a.data.account_bank.replace(/\s+/g, ""); - console.log("卡号", account_bank, "初始化", a.data.isck); - if (a.data.isck == 1) { - this.setData({ - - bank_name: a.data.bank_name, - account_bank: account_bank, - usernames: a.data.account_name, - distribut_min: a.data.distribut_min, - user_money: user_money, - needmon:a.data.needmon, - - }); - } else { - this.setData({ - - bank_name: a.data.bank_name, - account_bank: account_bank, - usernames: a.data.account_name, - distribut_min: a.data.distribut_min, - user_money: user_money, - needmon:a.data.needmon, - }); - } - } - } - }) - - }, - - //银行卡 - async yhk(account_bank) { - console.log("有进来吗银行卡" + account_bank); - var e = this, - bank_name = ""; - await getApp().request.promiseGet("/api/weshop/users/getBankName", { - data: { - bankno: account_bank, - } - }).then(res => { - var a = res.data; - if (a.data == null) { - console.log("来了吗"); - getApp().showWarning("银行卡不存在"); - this.setData({ - bank_name: " " - }); - return false; - } - console.log(a); - bank_name = a.data.bank_name; - console.log("s1w" + bank_name); - - }) - e.setData({ - bank_name: bank_name - }); - }, - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady: function() { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow: function() { - getApp().check_can_share(); - var th=this; - this.weixin(); - this.setData({ - button: 0 - }); - var user_info = getApp().globalData.userInfo; - if (user_info == null || user_info.mobile == undefined || user_info.mobile == " " || user_info.mobile == null) { - wx.navigateTo({ - url: '/pages/togoin/togoin', - }) - return false; - } - this.setData({ - val: null - }) - wx.setNavigationBarTitle({ - title: "流动资金提现", - }); - - //优惠券要实时更新 - getApp().getConfig2(function(e) { - var json_d = JSON.parse(e.switch_list); - var is_closetxbank=json_d.is_closetxbank; - var is_tx_wx=json_d.is_tx_wx; - var data={ - is_closetxbank:is_closetxbank,is_tx_wx:is_tx_wx - }; - if(is_closetxbank) data.current=2; - th.setData(data); - - },1) - }, - //提取金额的输入框事件 - defocus: function (event){ - var money = Number(event.detail.value); - var val =this.data.distribut_min; - console.log(Number(val).length, "sss", val, "提取金额的输入框事件", money.length, typeof Number(event.detail.value), money); - console.log("keyCode", event.detail.keyCode); - if (event.detail.keyCode ==8){ - return false}; - - if (money - -
- - - - 可提现余额 - ¥{{filter.getNum(user_money)}} - - - - - - 提现金额 - - ¥ - - - - - - - - - - 请按要求正确填写,预计1-7个工作日到账 - - 提现方式 - - - 银行卡 - - - - - 微信余额 - - - - - 姓名 - - - -
-
-
- - - - - - - {{dates}} - - - -
- - - 注: 读取时段内近10笔记录 -
- - - 没有数据 - - - - - - - - 提现 - - 状态:{{detail.status=="0"?"申请中":(detail.status=="1"?"申请成功":"申请失败")}} - - - - {{dateUtil.dateFormat(detail.create_time)}} - - {{detail.status=="1"?'-':'-'}}{{filter.getNum(detail.money)}} - - - - - - - - - - - - - - 流水号{{ordersn}} - 类型提现 - 支出{{money}} - 时间{{time}} - 银行{{bankname}} - 银行卡号{{accountbank}} - 账户名称{{accountname}} - 状态 - {{status=="0"?"申请中":(status=="1"?"申请成功":"申请失败")}} - - - -
\ No newline at end of file diff --git a/pages/user/member/cash_record/cash_record.wxss b/pages/user/member/cash_record/cash_record.wxss deleted file mode 100644 index 51fcf34..0000000 --- a/pages/user/member/cash_record/cash_record.wxss +++ /dev/null @@ -1,285 +0,0 @@ -/* 大边框 */ -.big-rim{ - margin-top: 15rpx; - width: 100%; - height: 270rpx; - border-bottom: 10px solid #EEEEEE; -} -.min-rim{ -display: flex; -width: 100%; -height: auto; -} -/* 开始时间 */ -.kssj{ -border-radius: 5px; -background-color: #EEEEEE; -border: 1px solid #DADADA; -width:220rpx; -height: 50rpx; -margin-top:5rpx; -margin-left:10rpx; -line-height:40rpx; - -} -.kstext{ -padding-bottom: 10rpx; -padding-left: 10rpx; -font-size: 25rpx; -color: #333; -font-family: 'SimHei',Arial; -} -/* 日期 */ -.rq{ - margin-top:15rpx; - font-size:30rpx; - font-family: 'SimHei',Arial; - margin-left:30rpx; -} -/* 开始时间 边框 */ -.kspicker{ - position: relative; - top:0rpx; - left: 0rpx; -} -/* 开始 */ -.ksqc{ - width: 25rpx; - height: 25rpx; - border-radius:50%; - background: #767676; - color: #fff; - font-size: 25rpx; - text-align: center; - line-height:19rpx; - -} -/* 至 */ -.zi{ - margin-top:15rpx; - font-size:30rpx; - font-family: 'SimHei',Arial; - margin-left:20rpx; -} -/* 结束时间边框 */ -.jspicker{ -position: relative; - top:0rpx; - left: 0rpx; - margin-left:20rpx; - -} -/* 结束时间 */ -.jssj{ -border-radius:5px; -background-color:#EEEEEE; -border:1px solid #DADADA; -width:220rpx; -height:50rpx; -margin-top:5rpx; -line-height:40rpx; - -} -.jstext{ - padding-bottom: 10rpx; -padding-left: 10rpx; -font-size: 25rpx; -color: #333; -font-family: 'SimHei',Arial; -} -.jspc{ - position:absolute; - top:7rpx; - left:192rpx; -} -/* 明细查询 */ -.botton{ - margin-left: 30rpx; - margin-top: 50rpx; - background-color: #C4182E; - width: 92%; - border-radius:10rpx; - text-align: center; - height: 77rpx; - line-height: 77rpx; - color: #FFF; - font-size: 28rpx; - border: none; - font-family: '微软雅黑'; - } - /* 注释 */ - .zs{ - margin-left: 30rpx; - font-size: 25rpx; - color: #999999; - margin-top:30rpx; - font-family: 'SimHei',Arial; - } -.db{ - display: flex; - width: 100%; - height: 100rpx; - border-bottom: 2rpx solid #e8e8e8; - line-height: 100rpx; -} -/* 项目 */ -.xm{ -margin-left: 30rpx; - height: 100rpx; - font-size: 35rpx; -color: #999999; -width: 50%; -vertical-align: middle; - -} -/* 金额 */ -.je{ - text-align: right; -padding-right:30rpx; - height: 100rpx; - font-size: 35rpx; -color: #999999; -width: 50%; -vertical-align: middle; -} -/* 没有数据 */ -.mysj{ - margin-top: 30rpx; - width: 100%; - height: 70rpx; - font-size: 34rpx; - text-align: center; - color: #888; -} -/*数据*/ -.data{ - display: flex; - width: 100%; - border-bottom: 1px solid #E8E8E8; - height: 120rpx; -} -/*左边的数据 */ -.left{ - width:50%; - height: 120rpx; -} -/* 单据单号 */ -.left-test{ - margin-left: 30rpx; - padding-top: 10rpx; - font-size: 30rpx; - color: #000000; - width: 100%; -} -/* 单据状态 */ -.type{ - margin-top: 10rpx; - font-size: 25rpx; - color: #999999; - width: 100%; -} -/* 单据时间 */ -.time{ - margin: 15rpx -17rpx; - width:280rpx; - font-size: 25rpx; - color: #999999; - - height: 30rpx; -} -/* 流动资金的加减 */ -.money{ -margin:20rpx; - height: 50rpx; - width: 120rpx; - margin-left:100rpx; - font-size: 30rpx; - font-family: 'SimHei',Arial; - text-align:right; -} -.right-rim{ - margin-left: 110rpx; - width: 35%; - height: auto; - -} -/*开始时间清空输入框的按钮*/ -.empty{ - position: absolute; - top: 25rpx; - left:318rpx; -} -/*结束时间清空输入框的按钮*/ -.end{ - width: 25rpx; - height: 25rpx; - border-radius:50%; - background: #767676; - color: #fff; - font-size: 25rpx; - text-align: center; - line-height:19rpx; - -} -/* 弹出框的大边框 */ -.big-rims{ - width:90%; - height: 500rpx; - position: fixed; - z-index: 9999; - background-color: #fff; - border-radius: 10rpx; - flex-direction: column; - align-items: center; - left:40rpx; - top:280rpx; - -} -/* 蒙层 */ - .mask{ - width: 100%; - height: 100%; - position: fixed; - top: 0; - left: 0; - background: #000; - z-index: 9000; - opacity: 0.1; -} -.eject-frame{ -width: 100%; - height: 100%; -margin: 0rpx auto; - line-height: 100%; - -} -/* 弹框参数名字 */ -.parameter-name{ - width: 121%; - height: 35rpx; - padding-left: 30rpx; - line-height:35rpx; -font-size:30rpx; -display: flex; -margin-top:25rpx; -font-family: 'SimHei',Arial; -} -/* 弹框参数 */ -.parameter{ - width: 40%; - height: 35rpx; - text-align:right; - line-height:35rpx; -font-size:30rpx; -font-family: 'SimHei',Arial; -margin-left:115rpx; -} -/* 参数名 */ -.name{ - width: 20%; - height: 35rpx; - -} -.green{ - color: #006600; -} \ No newline at end of file diff --git a/pages/user/member/cash_record/index.wxs b/pages/user/member/cash_record/index.wxs deleted file mode 100644 index e247f84..0000000 --- a/pages/user/member/cash_record/index.wxs +++ /dev/null @@ -1,63 +0,0 @@ -var formatNumber = function (n) { - n = n.toString() - return n[1] ? n : '0' + n -} - -var regYear = getRegExp("(y+)", "i"); - -var dateFormat = function (timestamp, format) { - if (!format) { - format = "yyyy-MM-dd hh:mm:ss"; - } - timestamp = parseInt(timestamp)*1000;; - var realDate = getDate(timestamp); - function timeFormat(num) { - return num < 10 ? '0' + num : num; - } - var date = [ - ["M+", timeFormat(realDate.getMonth() + 1)], - ["d+", timeFormat(realDate.getDate())], - ["h+", timeFormat(realDate.getHours())], - ["m+", timeFormat(realDate.getMinutes())], - ["s+", timeFormat(realDate.getSeconds())], - ["q+", Math.floor((realDate.getMonth() + 3) / 3)], - ["S+", realDate.getMilliseconds()], - ]; - var reg1 = regYear.exec(format); - // console.log(reg1[0]); - if (reg1) { - - format = format.replace(reg1[1], (realDate.getFullYear() + '').substring(4 - reg1[1].length)); - } - for (var i = 0; i < date.length; i++) { - var k = date[i][0]; - var v = date[i][1]; - - var reg2 = getRegExp("(" + k + ")").exec(format); - if (reg2) { - format = format.replace(reg2[1], reg2[1].length == 1 - ? v : ("00" + v).substring(("" + v).length)); - } - } - return format; -} - - -module.exports = { - dateFormat: dateFormat -}; - - -function parse(fmt) { - - var a = fmt.slice(0, 4); - console.log("a",a); - var b=+"-"; - console.log("b", b); - var c = fmt.slice(5, 7); - var d=+"-"; - console.log("d", d); - var e = fmt.slice(8, 9); - console.log("e", e); - -} \ No newline at end of file diff --git a/pages/user/member/filter.wxs b/pages/user/member/filter.wxs deleted file mode 100644 index c352e51..0000000 --- a/pages/user/member/filter.wxs +++ /dev/null @@ -1,22 +0,0 @@ -var numFr = { - getNum: function(x) { - var f = parseFloat(x); - if (isNaN(f)) { - return false; - } - var f = Math.round(x * 100) / 100; - var s = f.toString(); - var rs = s.indexOf('.'); - if (rs < 0) { - rs = s.length; - s += '.'; - } - while (s.length <= rs + 2) { - s += '0'; - } - return s; - } -} -module.exports = { - getNum: numFr.getNum -} \ No newline at end of file diff --git a/pages/user/member/menber.js b/pages/user/member/menber.js deleted file mode 100644 index a5fa887..0000000 --- a/pages/user/member/menber.js +++ /dev/null @@ -1,161 +0,0 @@ -var e = function (e) { - return e && e.__esModule ? e : { - default: e - }; -}(require("../../../utils/LoadMore.js")), t = getApp(), a = t.request, o = t.globalData.setting, os = o, - i = require("../../../utils/util.js"), ut = i, s = require("../../../utils/common.js"), n = new e.default(); -var regeneratorRuntime = require('../../../utils/runtime.js'); -Page({ - /** - * 页面的初始数据 - */ - data: { - url: o.imghost, - user_money:0.00, - frozen_money:0.00, - iurl: o.imghost, - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow: function () { - getApp().check_can_share(); - var th=this; - //--先判断会员状态-- - var user_info = getApp().globalData.userInfo; - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { - wx.navigateTo({ url: '/pages/togoin/togoin', }) - return false; - } - this.init_fir(); - wx.setNavigationBarTitle({ - title: "余额", - }) - //优惠券要实时更新 - getApp().getConfig2(function(e) { - var json_d = JSON.parse(e.switch_list); - - th.data.is_closetxbank=json_d.is_closetxbank; - th.data.is_tx_wx=json_d.is_tx_wx; - },1) - - }, - init_fir: function () { - this.myMoney(); //我的资产 - }, - //获取我的资产 - async myMoney() { - var e = this, frozen_money, user_money; - var user_id = getApp().globalData.user_id; - var store_id = os.stoid; - - console.log(user_id, "是什么用户", store_id); - await getApp().request.promiseGet("/api/weshop/users/getMymoney/" +store_id+ "/" + user_id - , { - data: {} - }).then(res => { - console.log("1" + res); - var a = res.data.data; - var a = res.data.data; - frozen_money = a.unavailable; - console.log(a,"s1w" + a.frozen_money); - user_money = a.liudong_money; - console.log("menber" + a.user_money ); - getApp().globalData.user_money = user_money; - console.log("menberssss" + user_money); - // 赋值getApp().globalData.can_use_money = 10; - // 取值var can = getApp().globalData.can_use_money; - }) - this.setData({ - frozen_money: frozen_money, user_money: user_money}); - }, - - - - -//提现记录 - urls: function () { - wx.navigateTo({ - url: 'cash_record/cash_record', - }) - }, - //不可用资金明细 - url: function () { - wx.navigateTo({ - url: 'account_unable/account_unable', - }) - }, - // 流动资金提现 - jumPage:function(){ - - //如果都关闭的情况下,不去提现 - if(this.data.is_closetxbank && !this.data.is_tx_wx ){ - wx.showToast({ - title: "商家暂未开通提现功能,敬请期待!", - icon: 'none', - duration: 2000 - }) - return false; - } - - wx.navigateTo({ - url: 'bring/bring', - }) - }, - //流动资金明细 - jumPages: function () { - wx.navigateTo({ - url: 'account/account', - }) - }, - /** - * 生命周期函数--监听页面加载 - */ - onLoad: function (options) { - - }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady: function () { - - }, - - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide: function () { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload: function () { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh: function () { - - }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom: function () { - - }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage: function () { getApp().globalData.no_clear=1 - - } -}) \ No newline at end of file diff --git a/pages/user/member/menber.json b/pages/user/member/menber.json deleted file mode 100644 index 9e26dfe..0000000 --- a/pages/user/member/menber.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/pages/user/member/menber.wxml b/pages/user/member/menber.wxml deleted file mode 100644 index 67fa3c5..0000000 --- a/pages/user/member/menber.wxml +++ /dev/null @@ -1,45 +0,0 @@ - - - - -总资产 (元) -{{filter.getNum(user_money)}} - - - -可提现 (元) -{{filter.getNum(user_money)}} - - -不可用 (元) -{{filter.getNum(frozen_money)}} - - - - - - -流动资金提现 - - - - - -流动资金明细 - - - - - -不可用资金明细 - - - - - - -提现记录 - - - - \ No newline at end of file diff --git a/pages/user/member/menber.wxss b/pages/user/member/menber.wxss deleted file mode 100644 index 5e086a0..0000000 --- a/pages/user/member/menber.wxss +++ /dev/null @@ -1,119 +0,0 @@ -/* 图片 */ -.pictuer{ - width: 100%; - height: 325rpx; -} -/* 资产的大边框 */ -.big{ - color: #FFFFFF; - position: absolute; - top: 20rpx; - left: 45rpx; - width: 665rpx; - height: 280rpx; -} -/* 总资产 */ -.font-one{ -font-size:28rpx; -text-align: left; -height: 55rpx; -line-height:55rpx; -margin:6rpx; -} -/* 资产金额 */ -.font-two{ - font-size: 45rpx; - font-family: 'SimHei',Arial; - margin:-10rpx 5rpx; - -} -/*可提现和不可提现的边框 */ -.rim-neo{ - width: 100%; - display: flex; - margin-top:67rpx; - height:120rpx; -} -/*不可提现的边框 */ -.rim-two{ -width: 50%; - height:120rpx; - display:inline-block; - -} - -/* 可提现 */ -.font-three{ - color: #ff9998; - font-size:25rpx; - text-align: left; - height: 50rpx; - line-height:50rpx; - display:inline-block; - width:150rpx; - -} -/* 可提现和金额的小边框 */ -.rim-three{ - width: 50%; - height: 120rpx; - display:inline-block; -} - -/*不可用 */ -.font-four{ - width: 100%; - display:inline-block; - color: #ff9998; - font-size:25rpx; - height:50rpx; -line-height:50rpx; - text-align: left; - font-family: 'SimHei',Arial; - -} -/* 可提现和不可提现的金额 */ -.font-five{ - font-size:45rpx; - font-family:'SimHei',Arial; -} -/* 流动资金的边框 */ -.min-rim-one{ - display: flex; - width: 100%; - height:90rpx; - line-height: 90rpx; - border-bottom: 1px solid #EEEEEE; -} -/* 流动资金的小图片 */ -.picture-two{ - margin-top:33rpx; - width: 40rpx; - height: 30rpx; - margin-left: 20rpx; -} -/* 流动资金 */ -.ldzj-font{ - margin-left: 20rpx; - font-size:25rpx; - width:200rpx; - -} -.picture-three{ - margin-top:32rpx; - margin-left: 420rpx; - height: 30rpx; - width: 20rpx; -} -.picture-four{ - margin-top:32rpx; - margin-left: 420rpx; - height: 30rpx; - width: 20rpx; -} -.picture-five{ - margin-top:32rpx; - margin-left: 420rpx; - height: 30rpx; - width: 20rpx; -} diff --git a/pages/user/my_service/i_service.wxml b/pages/user/my_service/i_service.wxml index 360e6bb..4dc9b7e 100644 --- a/pages/user/my_service/i_service.wxml +++ b/pages/user/my_service/i_service.wxml @@ -39,7 +39,8 @@ 剩余次数: - {{item.ObtainTimes}} + 无限次 + {{item.ObtainTimes}}