Commit b65cbc488516e4dc69ab967e3b7f25bc854a0209

Authored by abson
2 parents 809e49fa e76c0bc9

解决冲突

Showing 74 changed files with 809 additions and 7706 deletions
app.json
@@ -31,16 +31,9 @@ @@ -31,16 +31,9 @@
31 "pages/team/team_ping/team_ping", 31 "pages/team/team_ping/team_ping",
32 "pages/cart/cart2_pt/cart2_pt", 32 "pages/cart/cart2_pt/cart2_pt",
33 "pages/cart/cart_wk/cart_wk", 33 "pages/cart/cart_wk/cart_wk",
34 - "pages/user/member/menber",  
35 - "pages/user/member/bring/bring",  
36 - "pages/user/member/bring/msg/msg",  
37 - "pages/user/member/account/account",  
38 - "pages/user/member/account_unable/account_unable",  
39 - "pages/user/member/cash_record/cash_record",  
40 - "pages/user/coupons/coupons",  
41 - "pages/user/integral/integral",  
42 - "pages/user/integral/query/index",  
43 - "pages/user/integral/msg/msg", 34 +
  35 +
  36 +
44 "pages/user/userqy/userqy", 37 "pages/user/userqy/userqy",
45 "pages/user/user_spsy/user_spsy", 38 "pages/user/user_spsy/user_spsy",
46 "pages/user/user_fw/user_fw", 39 "pages/user/user_fw/user_fw",
@@ -74,9 +67,7 @@ @@ -74,9 +67,7 @@
74 "pages/cart/cart2_inte/cart2_inte", 67 "pages/cart/cart2_inte/cart2_inte",
75 "pages/giftpack/festival/festival", 68 "pages/giftpack/festival/festival",
76 "pages/team/team_more/team_more", 69 "pages/team/team_more/team_more",
77 - "pages/user/deposit/deposit",  
78 - "pages/user/deposit/prepaid/msg/msg",  
79 - "pages/user/deposit/prepaid/prepaid", 70 +
80 "pages/distribution/distribution", 71 "pages/distribution/distribution",
81 "pages/template/index" 72 "pages/template/index"
82 ], 73 ],
@@ -189,7 +180,21 @@ @@ -189,7 +180,21 @@
189 "pages/AI-test-skin/select_photo/select_photo", 180 "pages/AI-test-skin/select_photo/select_photo",
190 "pages/AI-test-skin/fail_result/fail_result", 181 "pages/AI-test-skin/fail_result/fail_result",
191 "pages/AI-test-skin/success_result/success_result", 182 "pages/AI-test-skin/success_result/success_result",
192 - "pages/AI-test-skin/analyse/analyse" 183 + "pages/AI-test-skin/analyse/analyse",
  184 +
  185 + "pages/user/coupons/coupons",
  186 + "pages/user/integral/integral",
  187 + "pages/user/integral/query/index",
  188 + "pages/user/integral/msg/msg",
  189 + "pages/user/deposit/deposit",
  190 + "pages/user/deposit/prepaid/msg/msg",
  191 + "pages/user/deposit/prepaid/prepaid",
  192 + "pages/user/member/menber",
  193 + "pages/user/member/bring/bring",
  194 + "pages/user/member/bring/msg/msg",
  195 + "pages/user/member/account/account",
  196 + "pages/user/member/account_unable/account_unable",
  197 + "pages/user/member/cash_record/cash_record"
193 ] 198 ]
194 } 199 }
195 200
packageA/pages/checkin/checkin.wxml
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 <view class="checkin-container"> 4 <view class="checkin-container">
5 <view class="rule-container flex"> 5 <view class="rule-container flex">
6 <view class="rule" bindtap="showRules">规则</view> 6 <view class="rule" bindtap="showRules">规则</view>
7 - <view class="points" bindtap="goto" data-url="/pages/user/integral/integral"> 7 + <view class="points" bindtap="goto" data-url="/packageD/pages/user/integral/integral">
8 <image class="coin" src="https://mshop-lib.yolipai.net/template/mobile/new/static/images/integral/coins.png"></image>我的积分 8 <image class="coin" src="https://mshop-lib.yolipai.net/template/mobile/new/static/images/integral/coins.png"></image>我的积分
9 </view> 9 </view>
10 </view> 10 </view>
packageA/pages/quan_list/quan_list.js
@@ -185,6 +185,4 @@ Page({ @@ -185,6 +185,4 @@ Page({
185 var item = this.data.dataList[index]; 185 var item = this.data.dataList[index];
186 getApp().goto("/packageA/pages/quan_pro/quan_pro?id=" + item.id); 186 getApp().goto("/packageA/pages/quan_pro/quan_pro?id=" + item.id);
187 } 187 }
188 -  
189 -  
190 }); 188 });
packageA/pages/quan_pro/quan_pro.js
@@ -132,7 +132,7 @@ Page({ @@ -132,7 +132,7 @@ Page({
132 this.setData({ 132 this.setData({
133 show_success:0 133 show_success:0
134 }) 134 })
135 - getApp().goto("/pages/user/coupons/coupons"); 135 + getApp().goto("/packageD/pages/user/coupons/coupons");
136 }, 136 },
137 137
138 close_show(){ 138 close_show(){
packageB/pages/luckactivity/luckinfo/luckinfo.js
@@ -1279,7 +1279,7 @@ Page({ @@ -1279,7 +1279,7 @@ Page({
1279 }; 1279 };
1280 switch(type) { 1280 switch(type) {
1281 case 1: { 1281 case 1: {
1282 - url = '/pages/user/integral/integral'; 1282 + url = '/packageD/pages/user/integral/integral';
1283 break; 1283 break;
1284 }; 1284 };
1285 case 2: { 1285 case 2: {
@@ -1287,7 +1287,7 @@ Page({ @@ -1287,7 +1287,7 @@ Page({
1287 break; 1287 break;
1288 }; 1288 };
1289 case 3: { 1289 case 3: {
1290 - url = '/pages/user/coupons/coupons'; 1290 + url = '/packageD/pages/user/coupons/coupons';
1291 break; 1291 break;
1292 }; 1292 };
1293 case 4: { 1293 case 4: {
pages/distribution/distribution.wxml
@@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
14 <view> 14 <view>
15 <view class="flex ai-center jc_sb pd2622 bdb arrow-r" bindtap="goto"> 15 <view class="flex ai-center jc_sb pd2622 bdb arrow-r" bindtap="goto">
16 <view><text class="iconfont icon-jine pdr10 ctb"></text>可提现金额</view> 16 <view><text class="iconfont icon-jine pdr10 ctb"></text>可提现金额</view>
17 - <view class="ctb money" data-url="/pages/user/member/menber">{{filter.show_default(data.liudong_money)}}</view> 17 + <view class="ctb money" data-url="/packageD/pages/user/member/menber">{{filter.show_default(data.liudong_money)}}</view>
18 </view> 18 </view>
19 19
20 <view class="flex jc_sa t-c"> 20 <view class="flex jc_sa t-c">
pages/giftpack/buygiftpack/giftpackbuy.js
1 var i = require("../../../utils/util.js"); 1 var i = require("../../../utils/util.js");
  2 +var com = require("../public/buy_com.js");
2 var e = getApp(), 3 var e = getApp(),
3 a = e.globalData.setting, 4 a = e.globalData.setting,
4 os = a, 5 os = a,
@@ -27,6 +28,44 @@ Page({ @@ -27,6 +28,44 @@ Page({
27 total: 0, //总数量 28 total: 0, //总数量
28 ad_data: null, 29 ad_data: null,
29 first_leader: e.globalData.first_leader || 0, // 推荐人ID 30 first_leader: e.globalData.first_leader || 0, // 推荐人ID
  31 +
  32 + //门店相关
  33 + ismend: 0,
  34 + is_sec_mend: 0,
  35 + sto_sele_name: "", //选中的门店名称
  36 + sto_sele_id: "", //选中的门店id
  37 + sto_sele_distr: "", //选择的门店的配送方式
  38 + is_show_sto_cat: 1, //是否显示门店分类
  39 + only_pk: null,
  40 + all_sto: null,
  41 + sec_sto: null, //选择了的门店分类
  42 + pickpu_list: null, //读出的所有门店list
  43 + def_pickpu_list: null, //一开始5个门店list
  44 + sec_pick_index: 0, //第二级门店选择ID
  45 + fir_pick_index: 0, //第一级门店选择ID
  46 + all_pick_list: null,//所有的门店先记录起来
  47 +
  48 + select_store: 0, //选择更多
  49 + index: 1,
  50 + more_store: 0, //选择门店
  51 + sort_store: 0, //门店分类
  52 + choice_sort_store: 0, //选择分类门店
  53 + new_user: 0, //新用户
  54 +
  55 + def_pick_store: null, // 默认的门店
  56 + fir_def_store: null, //客户默认的门店的
  57 + lat: null, //维度
  58 + lon: null, //经度
  59 +
  60 + is_get_local_ok: 0, //获取坐标是否完成
  61 + region_name: "门店分类", //区域的名字
  62 + is_gps: 1,
  63 + open_ind_store: 0, //哪里打开的门店列表的控制属性
  64 + default_store: {}, //创建添加默认门店地址的对象
  65 +
  66 + store:0,
  67 + openSpecModal:0
  68 +
30 }, 69 },
31 onLoad: function (options) { 70 onLoad: function (options) {
32 this.setData({ 71 this.setData({
@@ -80,6 +119,7 @@ Page({ @@ -80,6 +119,7 @@ Page({
80 }, 119 },
81 onShow: function () { 120 onShow: function () {
82 getApp().check_can_share(); 121 getApp().check_can_share();
  122 + var th=this;
83 //--先判断会员状态-- 123 //--先判断会员状态--
84 getApp().is_Single_page(this, function () { 124 getApp().is_Single_page(this, function () {
85 var user_info = getApp().globalData.userInfo; 125 var user_info = getApp().globalData.userInfo;
@@ -87,170 +127,112 @@ Page({ @@ -87,170 +127,112 @@ Page({
87 getApp().goto('/pages/togoin/togoin'); 127 getApp().goto('/pages/togoin/togoin');
88 return false; 128 return false;
89 } 129 }
  130 + com.wait_for_store_config(th);
  131 + com.set_user_mo_store(th,os);
  132 +
90 }) 133 })
91 this.init(); 134 this.init();
92 }, 135 },
93 136
94 //购买礼包 137 //购买礼包
95 GetBuyPrice: function (e) { 138 GetBuyPrice: function (e) {
96 - var that = this.data;  
97 - var th = this;  
98 - var id = e.currentTarget.dataset.id; //活动id  
99 - var my_confirm = th.selectComponent("#my_confirm"); //组件的id  
100 - var order_sn = e.currentTarget.dataset.order_sn; //订单号  
101 - var money = e.currentTarget.dataset.money; //支付金额  
102 - my_confirm.open(  
103 - "是否确定购买该礼包",  
104 - "取消",  
105 - "确定",  
106 - function () {  
107 - my_confirm.open_cancel(0);  
108 - },  
109 - function () {  
110 - my_confirm.open_cancel(0);  
111 - var json = {  
112 - "actId": '', //活动Id  
113 - "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销  
114 - "buyType": '2', //1=积分兑换 2=余额购买  
115 - "giftBagId": id, //礼包Id  
116 - "storeId": that.getStorageID, //商家Id  
117 - "userId": that.getUserID, //用户ID  
118 - "buyFrom": 2,  
119 - "first_leader": that.first_leader,  
120 - };  
121 139
122 - //-- 分享导购要记录 --  
123 - if (getApp().globalData.guide_id) {  
124 - json.guide_id = getApp().globalData.guide_id; 140 + var th = this;
  141 + var index = e.currentTarget.dataset.index; //活动id
  142 + var sele_g=th.data.wareCard[index];
  143 + th.setData({sele_g:sele_g,buyType:2,})
  144 + if(sele_g.is_pickup){
  145 + if(sele_g.pickup_list && th.data.def_pick_store){
  146 + com.check_def_pk(th);
125 } 147 }
126 -  
127 - var data = JSON.stringify(json);  
128 - var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert";  
129 - getApp().request.json_post(url, json,  
130 - function (res) {  
131 - if (res.data.code == 0 && res.data.data) {  
132 - var order_sn = res.data.data.orderSn;  
133 - res = res.data.data.result;  
134 - if (!res) return false;  
135 - var url = "/pages/giftpack/payment/payment?money=" + money + "&order_sn=" + order_sn;  
136 - wx.requestPayment({  
137 - timeStamp: String(res.timeStamp),  
138 - nonceStr: res.nonceStr,  
139 - package: res.packageValue,  
140 - signType: res.signType,  
141 - paySign: res.paySign,  
142 - success: function (res) {  
143 - getApp().goto(url);  
144 - },  
145 - fail: function (res) {  
146 - getApp().my_warnning("取消支付", 0, th);  
147 - }  
148 - });  
149 - } else {  
150 - getApp().my_warnning(res.data.msg, 0, th); 148 + com.get_sto(th,os)
  149 + th.setData({
  150 + openSpecModal:1
  151 + })
  152 + }else{
  153 + var my_confirm = th.selectComponent("#my_confirm"); //组件的id
  154 + my_confirm.open(
  155 + "是否确定购买该礼包",
  156 + "取消",
  157 + "确定",
  158 + function () {
  159 + my_confirm.open_cancel(0);
  160 + },
  161 + function () {
  162 + my_confirm.open_cancel(0);
  163 + com.buy_libao(th)
151 } 164 }
152 - },  
153 - function (res) {  
154 -  
155 - }  
156 165
157 ) 166 )
  167 + }
158 168
159 169
160 - }  
161 170
162 - )  
163 171
164 172
165 }, 173 },
166 // 积分兑换 174 // 积分兑换
167 GetBuyIntegral: function (e) { 175 GetBuyIntegral: function (e) {
168 - var that = this.data;  
169 - var th = this;  
170 - var id = e.currentTarget.dataset.id; //活动id  
171 - var my_confirm = th.selectComponent("#my_confirm"); //组件的id  
172 -  
173 - my_confirm.open(  
174 - "是否确定兑换该礼包",  
175 - "取消",  
176 - "确定",  
177 - function () {  
178 - my_confirm.open_cancel(0);  
179 - },  
180 - function () {  
181 - my_confirm.open_cancel(0);  
182 - var json = {  
183 - "actId": '', //活动Id  
184 - "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销  
185 - "buyType": '1', //1=积分兑换 2=余额购买 3=免费领取  
186 - "giftBagId": id, //礼包Id  
187 - "storeId": that.getStorageID, //商家Id  
188 - "userId": that.getUserID, //用户ID  
189 - "buyFrom": 2,  
190 - "first_leader": that.first_leader  
191 - };  
192 -  
193 - //-- 分享导购要记录 --  
194 - if (getApp().globalData.guide_id) {  
195 - json.guide_id = getApp().globalData.guide_id;  
196 - }  
197 - console.log(json, 'json');  
198 - var data = JSON.stringify(json);  
199 - var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert";  
200 - getApp().request.json_post(url, json,  
201 - function (res) {  
202 - if (res.data.code == 0) {  
203 - getApp().my_warnning("兑换成功!", 1, th);  
204 - } else {  
205 - getApp().my_warnning(res.data.msg, 0, th);  
206 - }  
207 - },  
208 - function (res) { })  
209 -  
210 - }) 176 + var th = this;
  177 + var index = e.currentTarget.dataset.index; //活动id
  178 + var sele_g=th.data.wareCard[index];
  179 + th.setData({sele_g:sele_g, buyType:1,})
  180 + if(sele_g.is_pickup){
  181 + if(sele_g.pickup_list && th.data.def_pick_store){
  182 + com.check_def_pk(th);
  183 + }
  184 + com.get_sto(th,os)
  185 + th.setData({
  186 + openSpecModal:1
  187 + })
  188 + }else {
  189 + var my_confirm = th.selectComponent("#my_confirm"); //组件的id
  190 + my_confirm.open(
  191 + "是否确定兑换该礼包",
  192 + "取消",
  193 + "确定",
  194 + function () {
  195 + my_confirm.open_cancel(0);
  196 + },
  197 + function () {
  198 + my_confirm.open_cancel(0);
  199 + com.buy_libao(th)
  200 + })
  201 + }
211 202
212 }, 203 },
213 //免费领取 204 //免费领取
214 GetFree: function (e) { 205 GetFree: function (e) {
215 - var that = this.data;  
216 - var th = this;  
217 - var id = e.currentTarget.dataset.id; //活动id  
218 - var my_confirm = th.selectComponent("#my_confirm"); //组件的id  
219 - my_confirm.open(  
220 - "是否确定领取该礼包",  
221 - "取消",  
222 - "确定",  
223 - function () {  
224 - my_confirm.open_cancel(0);  
225 - },  
226 - function () {  
227 - my_confirm.open_cancel(0);  
228 - var json = {  
229 - "actId": '', //活动Id  
230 - "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销  
231 - "buyType": '3', //1=积分兑换 2=余额购买 3=免费领取  
232 - "giftBagId": id, //礼包Id  
233 - "storeId": that.getStorageID, //商家Id  
234 - "userId": that.getUserID, //用户ID  
235 - "buyFrom": 2,  
236 - "first_leader": that.first_leader  
237 - };  
238 - //-- 分享导购要记录 --  
239 - if (getApp().globalData.guide_id) {  
240 - json.guide_id = getApp().globalData.guide_id;  
241 - }  
242 - var data = JSON.stringify(json);  
243 - var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert";  
244 - getApp().request.json_post(url, json,  
245 - function (res) {  
246 - if (res.data.code == 0) {  
247 - getApp().my_warnning("领取成功!", 1, th);  
248 - } else {  
249 - getApp().my_warnning(res.data.msg, 0, th);  
250 - }  
251 - },  
252 - function (res) { })  
253 - }) 206 +
  207 + var th = this;
  208 + var index = e.currentTarget.dataset.index; //活动id
  209 + var sele_g=th.data.wareCard[index];
  210 + th.setData({sele_g:sele_g, buyType:3,})
  211 +
  212 + if(sele_g.is_pickup){
  213 + if(sele_g.pickup_list && th.data.def_pick_store){
  214 + com.check_def_pk(th);
  215 + }
  216 + com.get_sto(th,os)
  217 + th.setData({
  218 + openSpecModal:1
  219 + })
  220 + }else {
  221 +
  222 +
  223 + var my_confirm = th.selectComponent("#my_confirm"); //组件的id
  224 + my_confirm.open(
  225 + "是否确定领取该礼包",
  226 + "取消",
  227 + "确定",
  228 + function () {
  229 + my_confirm.open_cancel(0);
  230 + },
  231 + function () {
  232 + my_confirm.open_cancel(0);
  233 + com.buy_libao(th)
  234 + })
  235 + }
254 }, 236 },
255 237
256 getList: function (e) { 238 getList: function (e) {
@@ -327,6 +309,7 @@ Page({ @@ -327,6 +309,7 @@ Page({
327 }, 309 },
328 310
329 onShareAppMessage: function (e) { 311 onShareAppMessage: function (e) {
  312 + getApp().globalData.no_clear=1;
330 var curPage = this; 313 var curPage = this;
331 var pagePath = curPage.route; //当前页面url 314 var pagePath = curPage.route; //当前页面url
332 if (pagePath.indexOf('/') != 0) { 315 if (pagePath.indexOf('/') != 0) {
@@ -341,6 +324,7 @@ Page({ @@ -341,6 +324,7 @@ Page({
341 324
342 // 分享朋友圈 325 // 分享朋友圈
343 onShareTimeline() { 326 onShareTimeline() {
  327 + getApp().globalData.no_clear=1;
344 var curPage = this; 328 var curPage = this;
345 var pagePath = curPage.route; //当前页面url 329 var pagePath = curPage.route; //当前页面url
346 if (pagePath.indexOf('/') != 0) { 330 if (pagePath.indexOf('/') != 0) {
@@ -354,4 +338,271 @@ Page({ @@ -354,4 +338,271 @@ Page({
354 } 338 }
355 }, 339 },
356 340
  341 +
  342 + //--- 设置一下默认库存的数量 ----
  343 + set_def_storage(ee) {
  344 + var that = this, th = this;
  345 + that.data.fir_def_store = ee;
  346 + that.setData({
  347 + def_pick_store: ee,
  348 + sto_sele_name: ee.pickup_name,
  349 + sto_sele_id: ee.pickup_id,
  350 + sto_sele_distr: ee.distr_type
  351 + })
  352 + },
  353 + // 选择门店
  354 + choice_store: function (ee) {
  355 + var th = this;
  356 + var ind = ee.currentTarget.dataset.ind;
  357 + var bconfig = th.data.bconfig;
  358 +
  359 + if (!th.data.only_pk && !th.data.def_pickpu_list) {
  360 + getApp().confirmBox("门店库存不足", null, 25000, !1);
  361 + return false;
  362 + }
  363 +
  364 + if (th.data.only_pk && !th.data.only_pk.length) {
  365 + getApp().confirmBox("门店库存不足", null, 25000, !1);
  366 + return false;
  367 + }
  368 + if (th.data.def_pickpu_list && !th.data.def_pickpu_list.length) {
  369 + getApp().confirmBox("门店库存不足", null, 25000, !1);
  370 + return false;
  371 + }
  372 +
  373 +
  374 + if (bconfig && bconfig.is_sort_storage) {
  375 + wx.getLocation({
  376 + type: 'gcj02',
  377 + success: function (res) {
  378 +
  379 + th.data.lat = res.latitude;
  380 + th.data.lon = res.longitude;
  381 + th.data.is_get_local_ok = 1;
  382 + th.setData({
  383 + is_gps: 1
  384 + });
  385 + //th.onShow();
  386 + com.get_sto(th,os);
  387 + },
  388 + fail: function (res) {
  389 + //th.onShow();
  390 + th.data.is_get_local_ok = 1;
  391 + com.get_sto(th,os);
  392 + if (res.errCode == 2) {
  393 + th.setData({
  394 + is_gps: 0
  395 + });
  396 + if (th.data.is_gps == 0) {
  397 + getApp().confirmBox("请开启GPS定位", null, 25000, !1);
  398 + }
  399 + } else {
  400 + th.setData({
  401 + is_gps: "3"
  402 + });
  403 + }
  404 +
  405 + }
  406 + })
  407 + } else {
  408 + th.data.is_get_local_ok = 1;
  409 + com.get_sto(th,os);
  410 + }
  411 +
  412 + if (ind != undefined && ind != null) {
  413 + this.setData({
  414 + open_ind_store: ind,
  415 + store: 1,
  416 + openSpecModal: !1,
  417 + openSpecModal_pt: !1,
  418 + openSpecModal_flash_normal: !1,
  419 + })
  420 + } else {
  421 + this.setData({
  422 + store: 1,
  423 + openSpecModal: !1,
  424 + openSpecModal_pt: !1,
  425 + openSpecModal_flash_normal: !1
  426 +
  427 + })
  428 + }
  429 + },
  430 + //关闭选择门店
  431 + close_popup: function (e) {
  432 + var th = this;
  433 + this.setData({
  434 + store: 0,
  435 + choice_sort_store: 0,
  436 + sort_store: 0,
  437 + fir_pick_index: 0,
  438 + sec_pick_index: 0
  439 + })
  440 +
  441 + var openindstore = this.data.open_ind_store;
  442 + if (openindstore == 1) {
  443 + th.setData({
  444 + openSpecModal: !0,
  445 + openSpecModal_ind: openindstore,
  446 + });
  447 + } else if (openindstore == 2) {
  448 + th.setData({
  449 + openSpecModal: !0,
  450 + openSpecModal_ind: openindstore,
  451 + });
  452 + }
  453 + else if (openindstore == 4) { //4就是拼团
  454 + th.setData({
  455 + openSpecModal_pt: 1, //打开拼团购买界面
  456 + store: 0, //关闭门店
  457 + choice_sort_store: 0, //关闭门店2级
  458 + sort_store: 0, //关闭门店2级
  459 + });
  460 + }
  461 + else {
  462 + th.setData({
  463 + store: 0,
  464 + choice_sort_store: 0,
  465 + sort_store: 0
  466 + })
  467 + }
  468 +
  469 +
  470 + },
  471 +
  472 + //选择更多门店
  473 + more_store: function () {
  474 + this.setData({
  475 + sort_store: 1
  476 + });
  477 + },
  478 + // 返回按钮
  479 + returns: function () {
  480 + this.setData({
  481 + sort_store: 0,
  482 + choice_sort_store: 0
  483 + });
  484 + },
  485 + //---选择分类门店---
  486 + choice_sort_store: function (e) {
  487 + var index = e.currentTarget.dataset.index;
  488 + var region_name = e.currentTarget.dataset.region;
  489 + var item = this.data.all_sto[index];
  490 + this.setData({
  491 + region_name: region_name,
  492 + sort_store: 0,
  493 + choice_sort_store: 1,
  494 + sec_sto: item,
  495 + sec_pick_index: 0
  496 + });
  497 + },
  498 +
  499 + choose_for_store_fir: function (e) {
  500 + var index_c = e.currentTarget.dataset.ind;
  501 + var th = this;
  502 + th.setData({
  503 + fir_pick_index: index_c
  504 + })
  505 +
  506 + },
  507 +
  508 + //确定def_pick为选择的门店
  509 + sure_pick: function (e) {
  510 + var th = this;
  511 + var item = null;
  512 + var openindstore = th.data.open_ind_store;
  513 +
  514 + if (th.data.choice_sort_store == 0) {
  515 + var index = th.data.fir_pick_index;
  516 + if (th.data.is_show_sto_cat == 1) {
  517 + item = th.data.def_pickpu_list[index];
  518 + } else {
  519 + item = th.data.only_pk[index]; //当没有门店分类的时候
  520 + }
  521 +
  522 + } else {
  523 + var index = th.data.sec_pick_index;
  524 + item = th.data.sec_sto.s_arr[index];
  525 + }
  526 +
  527 + if (!th.data.sele_g) return false;
  528 +
  529 + th.setData({
  530 + def_pick_store: item,
  531 + sto_sele_name: item.pickup_name,
  532 + sto_sele_id: item.pickup_id,
  533 + sto_sele_distr: item.distr_type,
  534 + store: 0,
  535 + choice_sort_store: 0,
  536 + fir_pick_index: 0,
  537 + openSpecModal: !0,
  538 + });
  539 +
  540 +
  541 + },
  542 + //---点击二级之后的选择---
  543 + choose_for_store: function (e) {
  544 + var index_c = e.currentTarget.dataset.ind;
  545 + var th = this;
  546 + th.setData({
  547 + sec_pick_index: index_c,
  548 + fir_pick_index: index_c
  549 + })
  550 +
  551 + },
  552 + //把选择的门店设置成默认的门店def_pick
  553 + set_def_pick: function (e) {
  554 + var th = this;
  555 + var item = null;
  556 + if (th.data.choice_sort_store == 0) {
  557 + var index = th.data.fir_pick_index;
  558 + if (th.data.is_show_sto_cat == 1) {
  559 + item = th.data.def_pickpu_list[index];
  560 + } else {
  561 + item = th.data.only_pk[index]; //当没有门店分类的时候
  562 + }
  563 + } else {
  564 + var index = th.data.sec_pick_index;
  565 + item = th.data.sec_sto.s_arr[index];
  566 + }
  567 +
  568 + th.setData({
  569 + def_pick_store: item,
  570 + sto_sele_name: item.pickup_name,
  571 + sto_sele_id: item.pickup_id,
  572 + sto_sele_distr: item.distr_type,
  573 + store: 0,
  574 + choice_sort_store: 0,
  575 + openSpecModal: !0,
  576 + });
  577 +
  578 + var user_id=getApp().globalData.user_id;
  579 + var def_pickup_id = item.pickup_id;
  580 + getApp().request.put('/api/weshop/users/update', {
  581 + data: {
  582 + user_id: user_id,
  583 + def_pickup_id: def_pickup_id
  584 + },
  585 + success: function (res) {
  586 + if (res.data.code == 0) {
  587 + if (th.data.choice_sort_store == 0) th.setData({
  588 + fir_pick_index: 0
  589 + });
  590 + getApp().globalData.pk_store = item;
  591 + } else {
  592 + getApp().my_warnning("设置默认门店地址失败", 0, th)
  593 + }
  594 +
  595 + }
  596 + });
  597 +
  598 +
  599 +
  600 + },
  601 + closeSpecModal: function () {
  602 + this.setData({openSpecModal: 0});
  603 + },
  604 +
  605 + buy_libao:function () {
  606 + com.buy_libao(this)
  607 + }
357 }) 608 })
358 \ No newline at end of file 609 \ No newline at end of file
pages/giftpack/buygiftpack/giftpackbuy.wxml
@@ -62,30 +62,30 @@ @@ -62,30 +62,30 @@
62 <view class="flex-vertical"> 62 <view class="flex-vertical">
63 <block wx:if="{{items.payMoney>0 && items.payIntegral>0}}"> 63 <block wx:if="{{items.payMoney>0 && items.payIntegral>0}}">
64 <block wx:if="{{items.payMoney>0}}"> 64 <block wx:if="{{items.payMoney>0}}">
65 - <view class="flex" bindtap="GetBuyPrice" data-id="{{items.lbId}}" data-money="{{items.payMoney}}"> 65 + <view class="flex" bindtap="GetBuyPrice" data-index="{{index}}">
66 <button class="box_button_dui">立即购买</button> 66 <button class="box_button_dui">立即购买</button>
67 </view> 67 </view>
68 </block> 68 </block>
69 <block wx:if="{{items.payIntegral>0}}"> 69 <block wx:if="{{items.payIntegral>0}}">
70 - <view class="flex" bindtap="GetBuyIntegral" data-id="{{items.lbId}}"> 70 + <view class="flex" bindtap="GetBuyIntegral" data-index="{{index}}">
71 <button class="box_button_dui box_button_buy">立即兑换</button> 71 <button class="box_button_dui box_button_buy">立即兑换</button>
72 </view> 72 </view>
73 </block> 73 </block>
74 </block> 74 </block>
75 <block wx:else> 75 <block wx:else>
76 <block wx:if="{{items.payMoney>0}}"> 76 <block wx:if="{{items.payMoney>0}}">
77 - <view class="flex" bindtap="GetBuyPrice" data-id="{{items.lbId}}" data-money="{{items.payMoney}}"> 77 + <view class="flex" bindtap="GetBuyPrice" data-index="{{index}}">
78 <button class="box_button_dui box_button_buy">立即购买</button> 78 <button class="box_button_dui box_button_buy">立即购买</button>
79 </view> 79 </view>
80 </block> 80 </block>
81 <block wx:if="{{items.payIntegral>0}}"> 81 <block wx:if="{{items.payIntegral>0}}">
82 - <view class="flex" bindtap="GetBuyIntegral" data-id="{{items.lbId}}"> 82 + <view class="flex" bindtap="GetBuyIntegral" data-index="{{index}}">
83 <button class="box_button_dui box_button_buy">立即兑换</button> 83 <button class="box_button_dui box_button_buy">立即兑换</button>
84 </view> 84 </view>
85 </block> 85 </block>
86 </block> 86 </block>
87 <block wx:if="{{!items.payMoney && !items.payIntegral}}"> 87 <block wx:if="{{!items.payMoney && !items.payIntegral}}">
88 - <view class="flex" bindtap="GetFree" data-id="{{items.lbId}}"> 88 + <view class="flex" bindtap="GetFree" data-index="{{index}}">
89 <button class="box_button_dui box_button_buy">免费领取</button> 89 <button class="box_button_dui box_button_buy">免费领取</button>
90 </view> 90 </view>
91 </block> 91 </block>
@@ -116,4 +116,6 @@ @@ -116,4 +116,6 @@
116 </view> 116 </view>
117 <!-- 引入提示组件 --> 117 <!-- 引入提示组件 -->
118 <warn id="warn"></warn> 118 <warn id="warn"></warn>
119 -<my_confirm id="my_confirm"></my_confirm>  
120 \ No newline at end of file 119 \ No newline at end of file
  120 +<my_confirm id="my_confirm"></my_confirm>
  121 +
  122 +<include src="../public/buy_com.wxml"></include>
121 \ No newline at end of file 123 \ No newline at end of file
pages/giftpack/buygiftpack/giftpackbuy.wxss
1 /*引用样式路径*/ 1 /*引用样式路径*/
2 @charset "UTF-8"; 2 @charset "UTF-8";
3 -  
4 -/* Author XGQ  
5 - * 2019-11-12  
6 - */ 3 +@import '../../goods/goodsInfo/goodsInfo.wxss';
7 4
8 page { 5 page {
9 /* background-color: #fb7454; */ 6 /* background-color: #fb7454; */
pages/giftpack/giftpacklist/giftpacklist.js
@@ -4,6 +4,7 @@ var e = getApp(), @@ -4,6 +4,7 @@ var e = getApp(),
4 t = e.request, 4 t = e.request,
5 d = e.globalData; 5 d = e.globalData;
6 var ut = require("../../../utils/util.js"); 6 var ut = require("../../../utils/util.js");
  7 +var com = require("../public/buy_com.js");
7 8
8 Page({ 9 Page({
9 data: { 10 data: {
@@ -30,6 +31,43 @@ Page({ @@ -30,6 +31,43 @@ Page({
30 is_lb: 0, //是否有礼包 31 is_lb: 0, //是否有礼包
31 default_color: null, 32 default_color: null,
32 first_leader: e.globalData.first_leader || 0, // 推荐人ID 33 first_leader: e.globalData.first_leader || 0, // 推荐人ID
  34 +
  35 + //门店相关
  36 + ismend: 0,
  37 + is_sec_mend: 0,
  38 + sto_sele_name: "", //选中的门店名称
  39 + sto_sele_id: "", //选中的门店id
  40 + sto_sele_distr: "", //选择的门店的配送方式
  41 + is_show_sto_cat: 1, //是否显示门店分类
  42 + only_pk: null,
  43 + all_sto: null,
  44 + sec_sto: null, //选择了的门店分类
  45 + pickpu_list: null, //读出的所有门店list
  46 + def_pickpu_list: null, //一开始5个门店list
  47 + sec_pick_index: 0, //第二级门店选择ID
  48 + fir_pick_index: 0, //第一级门店选择ID
  49 + all_pick_list: null,//所有的门店先记录起来
  50 +
  51 + select_store: 0, //选择更多
  52 + index: 1,
  53 + more_store: 0, //选择门店
  54 + sort_store: 0, //门店分类
  55 + choice_sort_store: 0, //选择分类门店
  56 + new_user: 0, //新用户
  57 +
  58 + def_pick_store: null, // 默认的门店
  59 + fir_def_store: null, //客户默认的门店的
  60 + lat: null, //维度
  61 + lon: null, //经度
  62 +
  63 + is_get_local_ok: 0, //获取坐标是否完成
  64 + region_name: "门店分类", //区域的名字
  65 + is_gps: 1,
  66 + open_ind_store: 0, //哪里打开的门店列表的控制属性
  67 + default_store: {}, //创建添加默认门店地址的对象
  68 +
  69 + store:0,
  70 + openSpecModal:0
33 }, 71 },
34 onLoad: function (options) { 72 onLoad: function (options) {
35 this.setData({ 73 this.setData({
@@ -87,81 +125,36 @@ Page({ @@ -87,81 +125,36 @@ Page({
87 GetBuyPrice: function (e) { 125 GetBuyPrice: function (e) {
88 var that = this.data; 126 var that = this.data;
89 var th = this; 127 var th = this;
90 - // var id = e.currentTarget.dataset.id;//活动id  
91 //如果还没有开始的话 128 //如果还没有开始的话
92 if (th.data.isStart != 1) { 129 if (th.data.isStart != 1) {
93 getApp().my_warnning("活动还没有开始", 0, th); 130 getApp().my_warnning("活动还没有开始", 0, th);
94 return false; 131 return false;
95 } 132 }
96 133
97 -  
98 - var money = e.currentTarget.dataset.money;  
99 - var my_confirm = th.selectComponent("#my_confirm"); //组件的id  
100 - my_confirm.open(  
101 - "是否确定购买该礼包",  
102 - "取消",  
103 - "确定",  
104 - function () {  
105 - my_confirm.open_cancel(0);  
106 - },  
107 - function () {  
108 - my_confirm.open_cancel(0);  
109 -  
110 - var json = {  
111 - "actId": '', //活动Id  
112 - "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销  
113 - "buyType": '2', //1=积分兑换 2=余额购买  
114 - "giftBagId": that.getGiftID, //礼包Id  
115 - "storeId": a.stoid, //商家Id  
116 - "userId": d.user_id, //用户ID  
117 - "buyFrom": 2,  
118 - "first_leader": that.first_leader,  
119 - };  
120 -  
121 - //-- 分享导购要记录 --  
122 - if (getApp().globalData.guide_id) {  
123 - json.guide_id = getApp().globalData.guide_id;  
124 - }  
125 -  
126 - var data = JSON.stringify(json);  
127 - var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert";  
128 -  
129 - getApp().request.json_post(url, json,  
130 - function (res) {  
131 - if (res.data.code == 0) {  
132 - var res = res.data.data;  
133 - if (!res) return false;  
134 - if (!res.result) return false;  
135 -  
136 - var order_sn = res.orderSn;  
137 - var url = "/pages/giftpack/payment/payment?money=" + money + "&order_sn=" + order_sn;  
138 - wx.requestPayment({  
139 - timeStamp: String(res.result.timeStamp),  
140 - nonceStr: res.result.nonceStr,  
141 - package: res.result.packageValue,  
142 - signType: res.result.signType,  
143 - paySign: res.result.paySign,  
144 - success: function (n) {  
145 - getApp().goto(url);  
146 - },  
147 - fail: function (n) {  
148 - getApp().my_warnning("取消支付", 0, th);  
149 - }  
150 - });  
151 - } else {  
152 - getApp().my_warnning(res.data.msg, 0, th); 134 + th.setData({ buyType:2 })
  135 + if(th.data.sele_g.is_pickup){
  136 + th.setData({
  137 + openSpecModal:1
  138 + })
  139 + }else{
  140 + var my_confirm = th.selectComponent("#my_confirm"); //组件的id
  141 + my_confirm.open(
  142 + "是否确定购买该礼包",
  143 + "取消",
  144 + "确定",
  145 + function () {
  146 + my_confirm.open_cancel(0);
  147 + },
  148 + function () {
  149 + my_confirm.open_cancel(0);
  150 + com.buy_libao(th)
153 } 151 }
154 - },  
155 - function (res) {  
156 -  
157 - }  
158 152
159 ) 153 )
  154 + }
160 155
161 156
162 - }  
163 157
164 - )  
165 158
166 }, 159 },
167 GetBuyIntegral: function (e) { 160 GetBuyIntegral: function (e) {
@@ -173,48 +166,28 @@ Page({ @@ -173,48 +166,28 @@ Page({
173 getApp().my_warnning("活动还没有开始", 0, th); 166 getApp().my_warnning("活动还没有开始", 0, th);
174 return false; 167 return false;
175 } 168 }
176 - // var id = e.currentTarget.dataset.id;//活动id  
177 - var my_confirm = th.selectComponent("#my_confirm"); //组件的id  
178 - my_confirm.open(  
179 - "是否确定兑换该礼包",  
180 - "取消",  
181 - "确定",  
182 - function () {  
183 - my_confirm.open_cancel(0);  
184 - },  
185 - function () {  
186 - my_confirm.open_cancel(0);  
187 - var json = {  
188 - "actId": '', //活动Id  
189 - "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销  
190 - "buyType": '1', //1=积分兑换 2=余额购买  
191 - "giftBagId": that.getGiftID, //礼包Id  
192 - "storeId": a.stoid, //商家ID  
193 - "userId": d.user_id, //用户ID  
194 - "buyFrom": 2,  
195 - "first_leader": that.first_leader,  
196 - };  
197 - //-- 分享导购要记录 --  
198 - if (getApp().globalData.guide_id) {  
199 - json.guide_id = getApp().globalData.guide_id;  
200 - }  
201 169
202 - var data = JSON.stringify(json);  
203 - var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert";  
204 - getApp().request.json_post(url, json,  
205 - function (res) {  
206 - if (res.data.code == 0) {  
207 - getApp().my_warnning("兑换成功!", 1, th);  
208 - } else {  
209 - getApp().my_warnning(res.data.msg, 0, th);  
210 - }  
211 - },  
212 - function (res) { 170 + th.setData({ buyType:1 });
  171 + if(th.data.sele_g.is_pickup){
  172 + th.setData({
  173 + openSpecModal:1
  174 + })
  175 + }else {
  176 + var my_confirm = th.selectComponent("#my_confirm"); //组件的id
  177 + my_confirm.open(
  178 + "是否确定兑换该礼包",
  179 + "取消",
  180 + "确定",
  181 + function () {
  182 + my_confirm.open_cancel(0);
  183 + },
  184 + function () {
  185 + my_confirm.open_cancel(0);
  186 + com.buy_libao(th)
  187 + })
  188 + }
213 189
214 - }  
215 190
216 - )  
217 - })  
218 191
219 192
220 }, 193 },
@@ -334,7 +307,20 @@ Page({ @@ -334,7 +307,20 @@ Page({
334 actTitle: res.data.data.actTitle, 307 actTitle: res.data.data.actTitle,
335 wareCard: res.data.data.wareCard, 308 wareCard: res.data.data.wareCard,
336 isStart: isStart, 309 isStart: isStart,
  310 + sele_g:res.data.data
337 }) 311 })
  312 +
  313 +
  314 + var sele_g=res.data.data;
  315 + com.wait_for_store_config(_this2);
  316 + com.set_user_mo_store(_this2,os,function () {
  317 + if(sele_g.pickup_list && _this2.data.def_pick_store){
  318 + com.check_def_pk(_this2);
  319 + }
  320 + });
  321 + com.get_sto(_this2,os);
  322 +
  323 +
338 } else { 324 } else {
339 getApp().my_warnning(res.data.msg, 0, _this2); 325 getApp().my_warnning(res.data.msg, 0, _this2);
340 return false; 326 return false;
@@ -421,6 +407,7 @@ Page({ @@ -421,6 +407,7 @@ Page({
421 407
422 //--- 分享设置 -- 408 //--- 分享设置 --
423 onShareAppMessage: function (e) { 409 onShareAppMessage: function (e) {
  410 + getApp().globalData.no_clear=1;
424 var curPage = this; 411 var curPage = this;
425 var pagePath = curPage.route; //当前页面url 412 var pagePath = curPage.route; //当前页面url
426 if (pagePath.indexOf('/') != 0) { 413 if (pagePath.indexOf('/') != 0) {
@@ -443,6 +430,7 @@ Page({ @@ -443,6 +430,7 @@ Page({
443 * 用户分享朋友圈 430 * 用户分享朋友圈
444 */ 431 */
445 onShareTimeline() { 432 onShareTimeline() {
  433 + getApp().globalData.no_clear=1;
446 var curPage = this; 434 var curPage = this;
447 var pagePath = curPage.route; //当前页面url 435 var pagePath = curPage.route; //当前页面url
448 if (pagePath.indexOf('/') != 0) { 436 if (pagePath.indexOf('/') != 0) {
@@ -471,50 +459,298 @@ Page({ @@ -471,50 +459,298 @@ Page({
471 getApp().my_warnning("活动还没有开始", 0, th); 459 getApp().my_warnning("活动还没有开始", 0, th);
472 return false; 460 return false;
473 } 461 }
474 - // var id = e.currentTarget.dataset.id;//活动id  
475 - var my_confirm = th.selectComponent("#my_confirm"); //组件的id  
476 - my_confirm.open(  
477 - "是否确定领取该礼包",  
478 - "取消",  
479 - "确定",  
480 - function () {  
481 - my_confirm.open_cancel(0);  
482 - },  
483 - function () {  
484 - my_confirm.open_cancel(0);  
485 - var json = {  
486 - "actId": '', //活动Id  
487 - "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销  
488 - "buyType": '3', //1=积分兑换 2=余额购买  
489 - "giftBagId": that.getGiftID, //礼包Id  
490 - "storeId": a.stoid, //商家ID  
491 - "userId": d.user_id, //用户ID  
492 - "buyFrom": 2,  
493 - "first_leader": that.first_leader,  
494 - };  
495 -  
496 - //-- 分享导购要记录 --  
497 - if (getApp().globalData.guide_id) {  
498 - json.guide_id = getApp().globalData.guide_id; 462 +
  463 + th.setData({ buyType:3 });
  464 + if(th.data.sele_g.is_pickup){
  465 + th.setData({
  466 + openSpecModal:1
  467 + })
  468 + }else {
  469 +
  470 +
  471 + // var id = e.currentTarget.dataset.id;//活动id
  472 + var my_confirm = th.selectComponent("#my_confirm"); //组件的id
  473 + my_confirm.open(
  474 + "是否确定领取该礼包",
  475 + "取消",
  476 + "确定",
  477 + function () {
  478 + my_confirm.open_cancel(0);
  479 + },
  480 + function () {
  481 + my_confirm.open_cancel(0);
  482 + com.buy_libao(th)
  483 + })
  484 + }
  485 +
  486 +
  487 + },
  488 +
  489 + //--- 设置一下默认库存的数量 ----
  490 + set_def_storage(ee) {
  491 + var that = this, th = this;
  492 + that.data.fir_def_store = ee;
  493 +
  494 + that.setData({
  495 + def_pick_store: ee,
  496 + sto_sele_name: ee.pickup_name,
  497 + sto_sele_id: ee.pickup_id,
  498 + sto_sele_distr: ee.distr_type
  499 + })
  500 + },
  501 + // 选择门店
  502 + choice_store: function (ee) {
  503 + var th = this;
  504 + var ind = ee.currentTarget.dataset.ind;
  505 + var bconfig = th.data.bconfig;
  506 +
  507 + if (!th.data.only_pk && !th.data.def_pickpu_list) {
  508 + getApp().confirmBox("门店库存不足", null, 25000, !1);
  509 + return false;
  510 + }
  511 +
  512 + if (th.data.only_pk && !th.data.only_pk.length) {
  513 + getApp().confirmBox("门店库存不足", null, 25000, !1);
  514 + return false;
  515 + }
  516 + if (th.data.def_pickpu_list && !th.data.def_pickpu_list.length) {
  517 + getApp().confirmBox("门店库存不足", null, 25000, !1);
  518 + return false;
499 } 519 }
500 520
501 - var data = JSON.stringify(json);  
502 - var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert";  
503 - getApp().request.json_post(url, json,  
504 - function (res) {  
505 - if (res.data.code == 0) {  
506 - getApp().my_warnning("领取成功!", 1, th); 521 +
  522 + if (bconfig && bconfig.is_sort_storage) {
  523 + wx.getLocation({
  524 + type: 'gcj02',
  525 + success: function (res) {
  526 +
  527 + th.data.lat = res.latitude;
  528 + th.data.lon = res.longitude;
  529 + th.data.is_get_local_ok = 1;
  530 + th.setData({
  531 + is_gps: 1
  532 + });
  533 + //th.onShow();
  534 + com.get_sto(th,os);
  535 + },
  536 + fail: function (res) {
  537 + //th.onShow();
  538 + th.data.is_get_local_ok = 1;
  539 + com.get_sto(th,os);
  540 + if (res.errCode == 2) {
  541 + th.setData({
  542 + is_gps: 0
  543 + });
  544 + if (th.data.is_gps == 0) {
  545 + getApp().confirmBox("请开启GPS定位", null, 25000, !1);
  546 + }
  547 + } else {
  548 + th.setData({
  549 + is_gps: "3"
  550 + });
  551 + }
  552 +
  553 + }
  554 + })
  555 + } else {
  556 + th.data.is_get_local_ok = 1;
  557 + com.get_sto(th,os);
  558 + }
  559 +
  560 + if (ind != undefined && ind != null) {
  561 + this.setData({
  562 + open_ind_store: ind,
  563 + store: 1,
  564 + openSpecModal: !1,
  565 + openSpecModal_pt: !1,
  566 + openSpecModal_flash_normal: !1,
  567 + })
  568 + } else {
  569 + this.setData({
  570 + store: 1,
  571 + openSpecModal: !1,
  572 + openSpecModal_pt: !1,
  573 + openSpecModal_flash_normal: !1
  574 +
  575 + })
  576 + }
  577 + },
  578 + //关闭选择门店
  579 + close_popup: function (e) {
  580 + var th = this;
  581 + this.setData({
  582 + store: 0,
  583 + choice_sort_store: 0,
  584 + sort_store: 0,
  585 + fir_pick_index: 0,
  586 + sec_pick_index: 0
  587 + })
  588 +
  589 + var openindstore = this.data.open_ind_store;
  590 + if (openindstore == 1) {
  591 + th.setData({
  592 + openSpecModal: !0,
  593 + openSpecModal_ind: openindstore,
  594 + });
  595 + } else if (openindstore == 2) {
  596 + th.setData({
  597 + openSpecModal: !0,
  598 + openSpecModal_ind: openindstore,
  599 + });
  600 + }
  601 + else if (openindstore == 4) { //4就是拼团
  602 + th.setData({
  603 + openSpecModal_pt: 1, //打开拼团购买界面
  604 + store: 0, //关闭门店
  605 + choice_sort_store: 0, //关闭门店2级
  606 + sort_store: 0, //关闭门店2级
  607 + });
  608 + }
  609 + else {
  610 + th.setData({
  611 + store: 0,
  612 + choice_sort_store: 0,
  613 + sort_store: 0
  614 + })
  615 + }
  616 +
  617 +
  618 + },
  619 +
  620 + //选择更多门店
  621 + more_store: function () {
  622 + this.setData({
  623 + sort_store: 1
  624 + });
  625 + },
  626 + // 返回按钮
  627 + returns: function () {
  628 + this.setData({
  629 + sort_store: 0,
  630 + choice_sort_store: 0
  631 + });
  632 + },
  633 + //---选择分类门店---
  634 + choice_sort_store: function (e) {
  635 + var index = e.currentTarget.dataset.index;
  636 + var region_name = e.currentTarget.dataset.region;
  637 + var item = this.data.all_sto[index];
  638 + this.setData({
  639 + region_name: region_name,
  640 + sort_store: 0,
  641 + choice_sort_store: 1,
  642 + sec_sto: item,
  643 + sec_pick_index: 0
  644 + });
  645 + },
  646 +
  647 + choose_for_store_fir: function (e) {
  648 + var index_c = e.currentTarget.dataset.ind;
  649 + var th = this;
  650 + th.setData({
  651 + fir_pick_index: index_c
  652 + })
  653 +
  654 + },
  655 +
  656 + //确定def_pick为选择的门店
  657 + sure_pick: function (e) {
  658 + var th = this;
  659 + var item = null;
  660 + var openindstore = th.data.open_ind_store;
  661 +
  662 + if (th.data.choice_sort_store == 0) {
  663 + var index = th.data.fir_pick_index;
  664 + if (th.data.is_show_sto_cat == 1) {
  665 + item = th.data.def_pickpu_list[index];
507 } else { 666 } else {
508 - getApp().my_warnning(res.data.msg, 0, th); 667 + item = th.data.only_pk[index]; //当没有门店分类的时候
509 } 668 }
510 - },  
511 - function (res) { }  
512 669
513 - )  
514 - }) 670 + } else {
  671 + var index = th.data.sec_pick_index;
  672 + item = th.data.sec_sto.s_arr[index];
  673 + }
515 674
  675 + if (!th.data.sele_g) return false;
  676 +
  677 + th.setData({
  678 + def_pick_store: item,
  679 + sto_sele_name: item.pickup_name,
  680 + sto_sele_id: item.pickup_id,
  681 + sto_sele_distr: item.distr_type,
  682 + store: 0,
  683 + choice_sort_store: 0,
  684 + fir_pick_index: 0,
  685 + openSpecModal: !0,
  686 + });
  687 +
  688 +
  689 + },
  690 + //---点击二级之后的选择---
  691 + choose_for_store: function (e) {
  692 + var index_c = e.currentTarget.dataset.ind;
  693 + var th = this;
  694 + th.setData({
  695 + sec_pick_index: index_c,
  696 + fir_pick_index: index_c
  697 + })
  698 +
  699 + },
  700 + //把选择的门店设置成默认的门店def_pick
  701 + set_def_pick: function (e) {
  702 + var th = this;
  703 + var item = null;
  704 + if (th.data.choice_sort_store == 0) {
  705 + var index = th.data.fir_pick_index;
  706 + if (th.data.is_show_sto_cat == 1) {
  707 + item = th.data.def_pickpu_list[index];
  708 + } else {
  709 + item = th.data.only_pk[index]; //当没有门店分类的时候
  710 + }
  711 + } else {
  712 + var index = th.data.sec_pick_index;
  713 + item = th.data.sec_sto.s_arr[index];
  714 + }
  715 + th.setData({
  716 + def_pick_store: item,
  717 + sto_sele_name: item.pickup_name,
  718 + sto_sele_id: item.pickup_id,
  719 + sto_sele_distr: item.distr_type,
  720 + store: 0,
  721 + choice_sort_store: 0,
  722 + openSpecModal: !0,
  723 + });
  724 +
  725 + var user_id=getApp().globalData.user_id;
  726 + var def_pickup_id = item.pickup_id;
  727 + getApp().request.put('/api/weshop/users/update', {
  728 + data: {
  729 + user_id: user_id,
  730 + def_pickup_id: def_pickup_id
  731 + },
  732 + success: function (res) {
  733 + if (res.data.code == 0) {
  734 + if (th.data.choice_sort_store == 0) th.setData({
  735 + fir_pick_index: 0
  736 + });
  737 + getApp().globalData.pk_store = item;
  738 + } else {
  739 + getApp().my_warnning("设置默认门店地址失败", 0, th)
  740 + }
516 741
517 - }, 742 + }
  743 + });
  744 +
  745 +
  746 + },
  747 + closeSpecModal: function () {
  748 + this.setData({openSpecModal: 0});
  749 + },
  750 +
  751 + buy_libao:function () {
  752 + com.buy_libao(this)
  753 + }
518 754
519 755
520 756
pages/giftpack/giftpacklist/giftpacklist.wxml
@@ -100,7 +100,7 @@ @@ -100,7 +100,7 @@
100 </block>--> 100 </block>-->
101 101
102 <block wx:if="{{isBuy==0&item.lbType==2}}"> 102 <block wx:if="{{isBuy==0&item.lbType==2}}">
103 - <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" class="data-v-3a5b7e36" lazy-load="true" data-url="/pages/user/coupons/coupons" bindtap="goto"></image> 103 + <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" class="data-v-3a5b7e36" lazy-load="true" data-url="/packageD/pages/user/coupons/coupons" bindtap="goto"></image>
104 </block> 104 </block>
105 <block wx:if="{{isBuy==0&item.lbType==3}}"> 105 <block wx:if="{{isBuy==0&item.lbType==3}}">
106 <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" class="data-v-3a5b7e36" lazy-load="true" data-url="/pages/user/my_service/i_service" bindtap="goto"></image> 106 <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" class="data-v-3a5b7e36" lazy-load="true" data-url="/pages/user/my_service/i_service" bindtap="goto"></image>
@@ -190,4 +190,6 @@ @@ -190,4 +190,6 @@
190 <!-- 弹出框扫描 --> 190 <!-- 弹出框扫描 -->
191 <qr_code id="qc_com"></qr_code> 191 <qr_code id="qc_com"></qr_code>
192 <!-- 制作一个圆球导航 --> 192 <!-- 制作一个圆球导航 -->
193 -<nav_b id="nav_b"></nav_b>  
194 \ No newline at end of file 193 \ No newline at end of file
  194 +<nav_b id="nav_b"></nav_b>
  195 +
  196 +<include src="../public/buy_com.wxml"></include>
195 \ No newline at end of file 197 \ No newline at end of file
pages/giftpack/giftpacklist/giftpacklist.wxss
1 @charset "UTF-8"; 1 @charset "UTF-8";
2 -  
3 -/* Author XGQ  
4 - * 2019-12-12  
5 - */ 2 +@import '../../goods/goodsInfo/goodsInfo.wxss';
6 3
7 .box.data-v-3a5b7e36 { 4 .box.data-v-3a5b7e36 {
8 -webkit-align-content: center; 5 -webkit-align-content: center;
pages/user/assistance/giftpacklist.wxml
@@ -79,7 +79,7 @@ @@ -79,7 +79,7 @@
79 </block> 79 </block>
80 </block> 80 </block>
81 <block wx:if="{{item.lbType==2}}"> 81 <block wx:if="{{item.lbType==2}}">
82 - <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" class="data-v-3a5b7e36" lazy-load="true" data-url="/pages/user/coupons/coupons" bindtap="goto"></image> 82 + <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" class="data-v-3a5b7e36" lazy-load="true" data-url="/packageD/pages/user/coupons/coupons" bindtap="goto"></image>
83 </block> 83 </block>
84 <block wx:if="{{item.lbType==3}}"> 84 <block wx:if="{{item.lbType==3}}">
85 <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" class="data-v-3a5b7e36" lazy-load="true" data-url="/pages/user/my_service/i_service" bindtap="goto"></image> 85 <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" class="data-v-3a5b7e36" lazy-load="true" data-url="/pages/user/my_service/i_service" bindtap="goto"></image>
pages/user/coupons/coupons.js deleted
1 -var t = getApp(),  
2 - a = t.request,  
3 - o = t.globalData.setting,  
4 - os = o,  
5 - i = require("../../../utils/util.js"),  
6 - ut = i,  
7 - s = require("../../../utils/common.js");  
8 -var regeneratorRuntime = require('../../../utils/runtime.js');  
9 -const {  
10 - barcode,  
11 - qrcode  
12 -} = require('../../../utils/index.js');  
13 -let _this = null;  
14 -  
15 -Page({  
16 - data: {  
17 -  
18 - val:false,  
19 - datet: "",  
20 - dates: "",  
21 - parameter: false,  
22 - details:[],//数据  
23 - isBind:true,//控制清空时间日期的按钮  
24 - isBinds: true,  
25 - select: false,//下拉框  
26 - grade_name: '未使用',  
27 - // grades: [ //old  
28 - // '所有',  
29 - // '已使用',  
30 - // '已过期',  
31 - // '未使用',  
32 - // ],  
33 - currentIndex: 0, //tab项当前指示器  
34 - grades: [  
35 - '未使用',  
36 - '已使用',  
37 - '已过期',  
38 - ],  
39 - display:false,  
40 - is_no_more: 0,  
41 - current_page:1,  
42 - by_list:[],  
43 - isloading:0,  
44 - pageNum: 1,  
45 - },  
46 - /**  
47 - * 生命周期函数--监听页面加载  
48 - */  
49 - onLoad: function (options) {  
50 - _this = this;  
51 - this.setData({  
52 - details: []  
53 - });  
54 - this.wjquery();  
55 - },  
56 - /**  
57 - * 生命周期函数--监听页面显示  
58 - */  
59 - onShow: function (options) {  
60 - var th = this;  
61 -  
62 - wx.setNavigationBarTitle({  
63 - title: "我的优惠券",  
64 - });  
65 -  
66 - /**  
67 - * 控制显示微券兑换  
68 - * by sty  
69 - */  
70 - getApp().getConfig2(function (ee) {  
71 - var json_d = JSON.parse(ee.switch_list);  
72 - let is_show_dhwz = json_d.dhwz_switch;  
73 - let grades = th.data.grades;  
74 - // console.log('is_show_dhwz----------------------------',is_show_dhwz);  
75 - if(is_show_dhwz) {  
76 - if(grades.indexOf('微券兑换') == -1) {  
77 - grades.push('微券兑换');  
78 - th.setData({ grades });  
79 - };  
80 - };  
81 - th.setData({ is_show_dhwz });  
82 - },1);  
83 - },  
84 -  
85 -  
86 -  
87 -  
88 - // 点击选中二维码  
89 - click: function (e) {  
90 - var val = e.currentTarget.dataset.cashrepno;  
91 - getApp().globalData.val = val;  
92 - wx.navigateTo({  
93 - url: '../qr_code/qr_code',  
94 - })  
95 - },  
96 - // 点击返回主页  
97 - // clicks: function () {  
98 - // this.setData({  
99 - // hide:true, display:false  
100 - // })  
101 - // },  
102 - //监听输入框显示清空按钮  
103 - watchPassWord: function (event) {  
104 - var val = event.detail.value;  
105 - if (val != "" && val != null) {  
106 - var isBind = false;  
107 - this.setData({ isBind: isBind });  
108 -  
109 - }  
110 - },  
111 - /**  
112 - * 点击下拉框  
113 - */  
114 - bindShowMsg() {  
115 - this.setData({  
116 - select: !this.data.select  
117 - })  
118 - },  
119 - /**  
120 - * 已选下拉框  
121 - */  
122 - // mySelect(e) {  
123 - // var name = e.currentTarget.dataset.name;  
124 - // this.setData({  
125 - // grade_name: name,  
126 - // select: false  
127 - // })  
128 - // },  
129 -  
130 - /**  
131 - * 点击tab  
132 - * by sty  
133 - */  
134 - clickTab(e) {  
135 - let index = e.target.dataset.index;  
136 - let name = e.target.dataset.name;  
137 -  
138 - this.setData({  
139 - is_get: 0,  
140 - pageNum: 1,  
141 - grade_name: name,  
142 - currentIndex: index,  
143 - is_no_more: 0,  
144 - current_page: 1,  
145 - noMore: false,  
146 - details: [],  
147 - by_list: [],  
148 - showQr: false,  
149 - });  
150 -  
151 -  
152 - if(index == 3) {//微券兑换  
153 - this.exchange();  
154 - } else {//其他  
155 - this.wjquery();  
156 - };  
157 - },  
158 -  
159 - /**  
160 - * 点击"立即使用"  
161 - * by sty  
162 - */  
163 - clickUse(e) {  
164 - let useIndex = e.currentTarget.dataset.index;  
165 - let val = e.currentTarget.dataset.cashrepno;  
166 -  
167 -  
168 - this.setData({  
169 - showQr: true,  
170 - useIndex,  
171 - });  
172 - this.qrcode(val);  
173 - },  
174 -  
175 - /**  
176 - * 关闭二维码  
177 - * by sty  
178 - */  
179 - closeQr() {  
180 - this.setData({  
181 - showQr: false,  
182 - });  
183 - },  
184 -  
185 - /**  
186 - * 生成二维码  
187 - * by sty  
188 - */  
189 - qrcode:function(val){  
190 - // console.log(val);  
191 - barcode('barcode', val, 600,160);  
192 - qrcode('qrcode', val, 300, 300);  
193 - },  
194 -  
195 - /**  
196 - * 请求微券列表  
197 - * by sty  
198 - */  
199 - async exchange() {  
200 - var result;  
201 - var user_id = getApp().globalData.user_id;  
202 - var store_id = os.stoid;  
203 -  
204 -  
205 - this.getData(true, '/api/weshop/users/listExchangeCoupons', {  
206 - user_id: user_id, store_id: store_id,  
207 - }).then(()=>{  
208 - _this.setData({  
209 - result: _this.data.list.pageData,  
210 - });  
211 - });  
212 -  
213 - // await getApp().request.promiseGet("/api/weshop/users/listExchangeCoupons", {  
214 - // data: {  
215 - // user_id: user_id, store_id: store_id,  
216 - // }  
217 - // }).then(res => {  
218 - // // var msg = res.data;  
219 - // // result = msg.data.pageData;  
220 - // })  
221 - // e.setData({  
222 - // result: result  
223 - // })  
224 - },  
225 -  
226 - /**  
227 - * 微券兑换对话框  
228 - * by sty  
229 - */  
230 - async clickExchange(e) {  
231 - var th=this;  
232 - var index = e.currentTarget.dataset.index;  
233 - var item = this.data.result[index];  
234 - this.data.monye = item.ToSum;  
235 - this.data.integr = item.Integral;  
236 - this.data.number = item.Number;  
237 -  
238 - let content = `确定使用${th.data.integr}积分兑换代金券面值${th.data.monye}元吗?`;  
239 - wx.showModal({  
240 - title: '提示',  
241 - content: content,  
242 - success (res) {  
243 - if (res.confirm) {  
244 - console.log('用户点击确定');  
245 - th.sure_pay();  
246 - } else if (res.cancel) {  
247 - console.log('用户点击取消')  
248 - }  
249 - }  
250 - });  
251 -  
252 -  
253 -  
254 - // var my_con = this.selectComponent("#my_con"); //组件的id  
255 - // var title="是否使用"+th.data.integr+"积分兑换代金券面值"+th.data.monye+"元";  
256 - // my_con.open(title, "确定", "取消", th.sure_pay, null)  
257 - },  
258 -  
259 -  
260 - /**  
261 - * 微券兑换  
262 - * by sty  
263 - */  
264 - sure_pay:function(){  
265 - var monye=this.data.monye;  
266 - var integr=this.data.integr;  
267 - var number=this.data.number;  
268 -  
269 - var user_id = getApp().globalData.user_id;  
270 - console.log(integr,"是什么微卷",typeof integr,monye);  
271 - var store_id = os.stoid;  
272 - getApp().request.post("/api/weshop/users/saveInterToCash", {  
273 - data: {  
274 - user_id: user_id,  
275 - store_id: store_id,  
276 - money:monye,  
277 - integ:integr,  
278 - number:number,  
279 - },  
280 - success: function (su) {  
281 - if (su.data.data!=null) {  
282 - // getApp().showWarning("兑换成功");  
283 - wx.showToast({  
284 - title: '兑换成功',  
285 - icon: 'success',  
286 - });  
287 - }else{  
288 - // getApp().showWarning("积分不足");  
289 - wx.showToast({  
290 - title: '积分不足',  
291 - icon: 'error',  
292 - });  
293 - }  
294 - }  
295 -  
296 - })  
297 - },  
298 -  
299 -  
300 - //明细查询  
301 - Gettime:function(e){  
302 - var page = 0;  
303 - //开始获取时间  
304 - var th = this;  
305 - var stime = th.data.datet;  
306 - var etime = th.data.dates;  
307 - var tpye = th.data.grade_name;  
308 -  
309 - //开始获取时间结束  
310 - //删除字符中的——  
311 - var datatk = stime.replace(/[-]/g, "");  
312 - var dataj = etime.replace(/[-]/g, "");  
313 - //转换类型  
314 - var datak = parseInt(datatk);  
315 - var dataj = parseInt(dataj);  
316 -  
317 - //判断初始时间小于结束时间  
318 - if (datak > dataj) {  
319 - getApp().showWarning("结束时间错误");  
320 - } else {  
321 - this.setData({ details: [] });  
322 - this.data.current_page=1;  
323 - this.data.is_no_more=0;  
324 - this.data.by_list=[];  
325 - this.data.details=[];  
326 - this.wjquery();  
327 - }  
328 -  
329 - },  
330 -  
331 - //微卷查询流水明细  
332 - async wjquery() {  
333 - if(this.data.isloading) return;  
334 - if(this.data.is_no_more) return;  
335 - this.data.isloading=1;  
336 - var th=this;  
337 -  
338 - var len = this.data.details.length;  
339 -  
340 - var e = this,sum, val, number;  
341 - var user_id = getApp().globalData.user_id;  
342 - var store_id = os.stoid;  
343 -  
344 - var stime = this.data.datet;  
345 - var etime = this.data.dates;  
346 -  
347 - var tpye = this.data.grade_name;  
348 - console.log("是什么类型",tpye);  
349 - var IsUse = 0;  
350 - var e = this;  
351 - var get_data = {  
352 - user_id: user_id,  
353 - store_id: store_id,  
354 - // pageSize: 10,  
355 - page: e.data.current_page,  
356 - };  
357 -  
358 - var dd={  
359 - user_id: user_id,  
360 - store_id: store_id,  
361 - // pageSize: 10,  
362 - };  
363 - dd.isuse=0;  
364 - // 判断下拉框,添加类型  
365 - if (tpye == "已使用"){  
366 - get_data.IsUse = 1;  
367 - dd.isuse=1;  
368 - } else if (tpye == "已过期"){  
369 - get_data.IsUse = 2;  
370 - } else if (tpye == "未使用"){  
371 - get_data.IsUse = 0;  
372 - };  
373 - if (etime != "" && etime != null) {  
374 - get_data.EndDate = etime;  
375 -  
376 - //时间要转成时间戳  
377 - var new_t=new Date(etime)/1000;  
378 - dd.etime=new_t;  
379 - }  
380 -  
381 - if (stime != "" && stime != null) {  
382 - get_data.BeginDate= stime;  
383 - //时间要转成时间戳  
384 - var new_t=new Date(stime)/1000;  
385 - dd.stime=new_t;  
386 - }  
387 -  
388 - var by_list=[];  
389 - if(th.data.current_page==1){  
390 - //先拿包邮券  
391 - await getApp().request.promiseGet("/api/weshop/userfeemail/pageAndArea?pageSize=100", {  
392 - data: dd,  
393 - }).then(res => {  
394 -  
395 - if(res.data.code == 0) {  
396 - th.setData({  
397 - byTotal: res.data.data.total,  
398 - });  
399 - };  
400 -  
401 - if(res.data.code==0 && res.data.data && res.data.data.total>0){  
402 -  
403 - by_list=res.data.data.pageData;  
404 - for(var i in by_list){  
405 - by_list[i].isby=1;  
406 - //过滤是时间的范围  
407 - if(get_data.IsUse == 2 && by_list[i].use_end_time<=ut.gettimestamp()){  
408 - th.data.by_list.push(by_list[i]);  
409 - }else if(get_data.IsUse == 0){  
410 - th.data.by_list.push(by_list[i]);  
411 - }else if(get_data.IsUse==1){  
412 - th.data.by_list.push(by_list[i]);  
413 - }else if(get_data.IsUse==undefined){  
414 - th.data.by_list.push(by_list[i]);  
415 - }  
416 - }  
417 - }  
418 - })  
419 - }  
420 -  
421 - var big_arr = this.data.details; ///api/weshop / users / listQuan  
422 - if(th.data.current_page==1 && th.data.by_list.length>0) {  
423 - big_arr=th.data.by_list;  
424 - };  
425 -  
426 -  
427 - await getApp().request.promiseGet("/api/weshop/users/listQuan", {  
428 - data: get_data,  
429 - isShowLoading: 1  
430 -  
431 - }).then(res => {  
432 -  
433 - th.data.isloading=0;  
434 - var a = res.data;  
435 - var len = e.data.details.length;  
436 - var details = a.data.pageData;  
437 -  
438 - th.setData({  
439 - pageSize: a.data.pageSize,  
440 - wjTotal: a.data.total,  
441 - });  
442 -  
443 - if (details.length == 0) {  
444 - this.setData({  
445 - is_no_more: 1,  
446 - });  
447 - // getApp().showWarning("未找更多数据");  
448 - if(th.data.by_list && th.data.current_page==1){  
449 - th.setData({ val: val,details:th.data.by_list});  
450 - details=th.data.by_list;  
451 - setTimeout(function () {  
452 - for (var i = 0; i < details.length; i++) {  
453 - var no = i + len;  
454 - qrcode('qrcode' + no, details[i].no,460, 460);  
455 - }  
456 - }, 100)  
457 - }  
458 - return false;  
459 - }  
460 -  
461 - th.data.current_page++;  
462 - val = a.data.total+th.data.by_list.length;  
463 -  
464 - big_arr=big_arr.concat(details);  
465 - this.setData({  
466 - details: big_arr,val: val,  
467 - is_get: 1,  
468 - current_page: this.data.current_page,  
469 - });  
470 -  
471 - setTimeout(function () {  
472 - if(by_list) details=big_arr;  
473 - for (var i = 0; i < details.length; i++) {  
474 - var no = i + len;  
475 - qrcode('qrcode' + no, details[i].CashRepNo?details[i].CashRepNo:details[i].no,460, 460);  
476 - }  
477 - }, 100)  
478 - })  
479 -  
480 -  
481 -  
482 - },  
483 -  
484 -  
485 - // 使用说明详情展开  
486 - clickDetails: function(e) {  
487 - let details = this.data.details;  
488 - let index = e.currentTarget.dataset.index;  
489 - details[index].isShowDetails = !details[index].isShowDetails;  
490 - this.setData({  
491 - details,  
492 - });  
493 - },  
494 -  
495 -  
496 -  
497 - //---加载更多是靠这个函数----  
498 - onReachBottom: function () {  
499 - if(this.data.currentIndex != 3) {  
500 - this.wjquery();  
501 - } else {  
502 - this.scrollToLower('/api/weshop/users/listExchangeCoupons', {  
503 - user_id: getApp().globalData.user_id,  
504 - store_id: os.stoid,  
505 - }, function() {  
506 - // console.log('!!!!!', _this.data.list.pageData);  
507 - _this.setData({  
508 - result: _this.data.list.pageData,  
509 - });  
510 - });  
511 - };  
512 - },  
513 -  
514 -  
515 - //起始时间  
516 - // bindDateChenge: function(e) {  
517 - // console.log("是什么", e.detail.value);  
518 - // var isBind = false;  
519 - // this.setData({  
520 - // datet: e.detail.value, isBind: isBind  
521 - // });  
522 - // },  
523 - // 结束时间  
524 - // bindDateChenges: function(e) {  
525 - // console.log("是什么", e.detail.value);  
526 - // var isBinds = false;  
527 - // this.setData({  
528 - // dates: e.detail.value, isBinds: isBinds  
529 - // });  
530 - // },  
531 - //catchtap阻止冒泡,点击清除开始时间的按钮  
532 - // eliminate:function(){  
533 - // console.log("试试");  
534 - // var isBind= true;  
535 - // var data="";  
536 - // this.setData({ datet: data, isBind: isBind})  
537 - // },  
538 - //catchtap阻止冒泡,点击清除结束时间的按钮  
539 - // eliminates: function () {  
540 - // console.log("试试");  
541 - // var isBinds = true;  
542 - // var dates = "";  
543 - // this.setData({ dates: dates, isBinds: isBinds })  
544 - // },  
545 -  
546 -  
547 -  
548 -  
549 -  
550 -  
551 - // 上拉加载请求数据  
552 - getData: function(isInit, url, data) {  
553 - return getApp().request.promiseGet(url, {data: data, isShowLoading: true,})  
554 - .then((res) => {  
555 - _this.data.isLoading = false;  
556 - if(res.data.code == 0) {  
557 - if(isInit) {// 第一次加载  
558 - _this.setData({  
559 - list: res.data.data  
560 - });  
561 - } else {  
562 - _this.setData({  
563 - 'list.pageData': _this.data.list.pageData.concat(res.data.data.pageData)  
564 - });  
565 - };  
566 -  
567 - if((res.data.data.pageData.length == 0) || (res.data.data.pageSize * res.data.data.page >= res.data.data.total)) {  
568 - _this.setData({  
569 - noMore: true  
570 - });  
571 - };  
572 - };  
573 - });  
574 - },  
575 -  
576 -  
577 - // 上拉加载  
578 - scrollToLower(url, requestData, callback) {  
579 - // 页面数据  
580 - // let pageData = this.data.list.pageData;  
581 - // 数据总量  
582 - let total = this.data.list.total;  
583 - // 单页最大数据量  
584 - let pageSize = this.data.list.pageSize;  
585 - // 如果数据总量不为0且小于或等于单页最大数据量,说明数据已全部加载,显示‘没有更多了’  
586 - if((total != 0)&&(total <= pageSize)) {  
587 - this.setData({  
588 - noMore: true  
589 - });  
590 - };  
591 -  
592 - if(!this.data.isloading && !this.data.noMore) {  
593 - this.setData({  
594 - isLoading: true,  
595 - pageNum: this.data.pageNum + 1  
596 - });  
597 - requestData.page = this.data.pageNum;  
598 - this.getData(false, url, requestData).then(()=>{  
599 - if(callback) {  
600 - callback();  
601 - };  
602 - });  
603 - };  
604 - },  
605 -  
606 - // 禁用滚动  
607 - // disableScroll() {  
608 - // this.setData({  
609 - // scrollType: 'disableScroll'  
610 - // });  
611 - // },  
612 -  
613 - //启用滚动  
614 - // enableScroll() {  
615 - // this.setData({  
616 - // scrollType: '',  
617 - // });  
618 - // },  
619 -  
620 - touchStart() {},  
621 - touchMove() {},  
622 - touchEnd() {},  
623 -  
624 -})  
625 \ No newline at end of file 0 \ No newline at end of file
pages/user/coupons/coupons.json deleted
1 -{  
2 - "enablePullDownRefresh": false,  
3 - "usingComponents": {  
4 - "nodata": "/components/nodata/nodata"  
5 - }  
6 -}  
7 \ No newline at end of file 0 \ No newline at end of file
pages/user/coupons/coupons.wxml deleted
1 -<wxs module="filter" src="filter.wxs"></wxs>  
2 -<wxs module="time" src="../../../utils/filter.wxs"></wxs>  
3 -  
4 -<view>  
5 -  
6 - <view class="tab-head" bindtap="clickTab">  
7 - <view wx:for="{{grades}}" wx:key="unique" class="tab-head-item {{currentIndex == index ? 'active':''}}" data-name="{{item}}" data-index="{{index}}">{{item}}</view>  
8 - </view>  
9 -  
10 - <view class="tab-body">  
11 - <block wx:if="{{currentIndex != 3}}">  
12 - <view class="tab-list-item" wx:for="{{details}}" wx:for-index="idx" wx:for-item="detail">  
13 - <block wx:if="{{detail.isby}}">  
14 - <view class="coupon">  
15 - <view class="flex">  
16 - <view class="c-l"><text class="fs40">包邮券</text></view>  
17 - <view class="c-r dash">  
18 - <view class="flex jc_sb ai_c">  
19 - <view class="pdr20">  
20 - <view class="fs28 ellipsis-1x">包邮券</view>  
21 - <view class="fs24 c-7b pdt4 ellipsis-1x">微券来源: 微信商城</view>  
22 - </view>  
23 - <view class="shrink0"><text class="btn {{currentIndex != 0 ? 'gray':''}}" bindtap="{{currentIndex == 0 ? 'clickUse':''}}" data-index="{{idx}}" data-cashrepno="{{detail.no}}">{{filter.showBtnText(currentIndex)}}</text></view>  
24 - </view>  
25 - <view class="c-time">  
26 - <text class="ellipsis-1x" wx:if="{{detail.use_end_time!=null}}">有效期:{{detail.use_start_time==null?" " : time.format_time(detail.use_start_time)}} 至 {{time.format_time(detail.use_end_time)}}</text>  
27 - <text wx:else>有效期:不限</text>  
28 - </view>  
29 - </view>  
30 - </view>  
31 - </view>  
32 - <view class="c-info arrow-down {{detail.isShowDetails ? 'active':''}}" bindtap="clickDetails" data-index="{{idx}}">  
33 - <!--<text class="{{detail.isShowDetails ? '':'ellipsis-1x'}}">使用说明: 包邮券,全场通用,满 {{detail.condition}}元使用{{detail.title?',不包邮地区:'+detail.title:''}}</text>-->  
34 - <text class="{{detail.isShowDetails ? '':'ellipsis-1x'}}"><text style="margin-right: 15rpx">使用说明:</text>购买礼包得优惠券【消费满{{time.toFix(detail.condition,2)}}元可用】</text>  
35 - </view>  
36 - </block>  
37 -  
38 - <block wx:else>  
39 - <view class="coupon">  
40 - <view class="flex">  
41 - <view class="c-l"><text class="rmb fs40">{{filter.getNum(detail.Sum)}}</text></view>  
42 - <view class="c-r dash">  
43 - <view class="flex jc_sb ai_c">  
44 - <view class="pdr20">  
45 - <view class="fs28 ellipsis-1x">{{filter.getNum(detail.Sum)}}元微券</view>  
46 - <view class="fs24 c-7b pdt4 ellipsis-1x">微券来源: {{detail.SendMan==null?'线下发放':detail.SendMan==''?"线下发放":detail.SendMan}}</view>  
47 - </view>  
48 - <view class="shrink0">  
49 - <text class="btn {{currentIndex != 0 ? 'gray':''}}" bindtap="{{currentIndex == 0 ? 'clickUse':''}}" data-index="{{idx}}" data-cashrepno="{{detail.CashRepNo}}">{{filter.showBtnText(currentIndex)}}</text>  
50 - </view>  
51 - </view>  
52 - <view class="c-time">  
53 - <text wx:if="{{detail.ValidDate}}" class="ellipsis-1x">有效期:{{detail.BeginDate==null ? " " : time.replace_time2(detail.BeginDate)}} 至 {{time.replace_time2(detail.ValidDate)}}</text>  
54 - <text wx:else>有效期:不限</text>  
55 - </view>  
56 - </view>  
57 - </view>  
58 - </view>  
59 - <view class="c-info arrow-down {{detail.isShowDetails ? 'active':''}}" bindtap="clickDetails" data-index="{{idx}}">  
60 - <view class="{{detail.isShowDetails ? '':'ellipsis-1x'}}" wx:if="{{detail.Remark1!=''}}"><text style="margin-right: 15rpx">使用说明:</text>{{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}}</view>  
61 - <view class="{{detail.isShowDetails ? '':'ellipsis-1x'}}" wx:else><text style="margin-right: 15rpx">使用说明:</text> {{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}}</view>  
62 - </view>  
63 - </block>  
64 - </view>  
65 - </block>  
66 -  
67 -  
68 - <block wx:else>  
69 - <view class="tab-list-item" wx:for="{{result}}" wx:for-item="result">  
70 - <view class="coupon2">  
71 - <view class="flex">  
72 - <view class="c-l"><text class="rmb fs40">{{filter.getNum(result.ToSum)}}</text></view>  
73 - <view class="c-r dash">  
74 - <view class="flex jc_sb ai_c">  
75 - <view class="pdr20">  
76 - <view class="fs26 ellipsis-1x breakall">{{result.Integral}}积分兑换{{filter.getNum(result.ToSum)}}元微券</view>  
77 - <!-- <view class="fs24 c-7b pdt4 ellipsis-1x">微券来源: 微信商城</view> -->  
78 - </view>  
79 - <view class="shrink0"><text class="btn2" bindtap="clickExchange" data-index="{{index}}">立即兑换</text></view>  
80 - </view>  
81 - <!-- <view class="c-time">  
82 - <text class="ellipsis-1x" wx:if="{{detail.use_end_time!=null}}">有效期:{{detail.use_start_time==null?" " : time.format_time(detail.use_start_time)}}至{{ time.format_time(detail.use_end_time)}}</text>  
83 - <text wx:else>有效期:不限</text>  
84 - </view> -->  
85 - </view>  
86 - </view>  
87 - </view>  
88 - </view>  
89 - </block>  
90 -  
91 - <!-- 暂无数据 -->  
92 - <nodata nodataContainer="t-c" wx:if="{{(is_no_more == 1 && current_page == 1) || (result.length == 0)}}"></nodata>  
93 -  
94 - <block wx:if="{{is_get}}">  
95 - <!-- 没有更多数据 -->  
96 - <view class="noMore 1" wx:if="{{(is_no_more == 1)||((details.length !== 0) && (pageSize >= (byTotal+wjTotal)))}}">—— 已经到底了 ——</view>  
97 - </block>  
98 - <view class="noMore 2" wx:if="{{noMore}}">—— 已经到底了 ——</view>  
99 - </view>  
100 -  
101 -</view>  
102 -  
103 -  
104 -  
105 -  
106 -<!-- 遮罩层 -->  
107 -<view class="mask" hidden="{{!showQr}}" catchtouchmove="touchMove"></view>  
108 -<!-- 码 -->  
109 -<view class="popup-container" hidden="{{!showQr}}" catchtouchmove="touchMove">  
110 - <view class="t-r pdb20"><text class="iconfont icon-close fs40" bindtap="closeQr"></text></view>  
111 - <view class="popup">  
112 - <view class="popup-title">  
113 - <block wx:if="{{details[useIndex].isby == 1}}">包邮券</block>  
114 - <block wx:else>  
115 - {{filter.getNum(details[useIndex].Sum)}}元微券  
116 - </block>  
117 - </view>  
118 - <!-- <view class="pdt20 c-fe0000"><text class="rmb fs80" wx:if="{{details[useIndex].isby != 1}}">{{filter.getNum(details[useIndex].Sum)}}</text></view> -->  
119 - <!-- 条形码 -->  
120 - <view class="bar-container">  
121 - <canvas class="barcode" canvas-id="barcode"/>  
122 - <view class="pdt20 fs26" wx:if="{{details[useIndex].CashRepNo}}">{{details[useIndex].CashRepNo}}</view>  
123 - <view class="pdt20 fs26" wx:else>{{details[useIndex].no}}</view>  
124 - </view>  
125 - <!-- 二维码 -->  
126 - <view class="qr-container">  
127 - <canvas class="qrcode" canvas-id="qrcode"/>  
128 - </view>  
129 - <view class="pdv20 c-7b fs26 bdt">  
130 - <text wx:if="{{details[useIndex].ValidDate}}" class="ellipsis-1x">有效期:{{details[useIndex].BeginDate==null ? " " : time.replace_time2(details[useIndex].BeginDate)}} 至 {{time.replace_time2(details[useIndex].ValidDate)}}</text>  
131 - <text wx:elif="{{details[useIndex].use_end_time}}" class="ellipsis-1x">有效期:{{details[useIndex].use_start_time==null ? " " : time.format_time(details[useIndex].use_start_time)}} 至 {{time.format_time(details[useIndex].use_end_time)}}</text>  
132 - <text wx:else>有效期:不限</text>  
133 - </view>  
134 - </view>  
135 -</view>  
136 -  
137 -  
138 -  
139 -  
pages/user/coupons/coupons.wxss deleted
1 -/* 大边框 */  
2 -.big-rim{  
3 - margin-top: 15rpx;  
4 - width: 100%;  
5 - height: 310rpx;  
6 -border-bottom: 8px solid #EEEEEE;  
7 -}  
8 -.min-rim{  
9 -display: flex;  
10 -width: 100%;  
11 -height: auto;  
12 -margin-left: 30rpx;  
13 -}  
14 -  
15 -/* 开始时间 */  
16 -.kssj{  
17 -  
18 -display: inline-block;  
19 -height: 50rpx;  
20 -background-color: #EEEEEE;  
21 -border: 1px solid #DADADA;  
22 -width:200rpx;  
23 -border-radius: 3px;  
24 -line-height:40rpx;  
25 -}  
26 -/* 开始时间的文字 */  
27 -.wz{  
28 - display: inline-block;  
29 -font-size: 25rpx;  
30 -color: #333;  
31 -}  
32 -/* 日期控件 */  
33 -.pi{  
34 - width:200rpx;  
35 - height:auto;  
36 - margin-left:20rpx;  
37 -  
38 -}  
39 -  
40 -  
41 -  
42 -/* 查询内容 */  
43 -.cxnr{  
44 - margin-left:30rpx;  
45 - font-size:28rpx;  
46 - font-family: 'SimHei',Arial;  
47 -}  
48 -.rq-rim{  
49 -position:relative;  
50 -left:0;  
51 -top:0;  
52 -}  
53 -/* 至 */  
54 -.zi{  
55 -  
56 - margin-top:14rpx;  
57 - font-size:28rpx;  
58 - font-family: 'SimHei',Arial;  
59 - margin-left:20rpx;  
60 -  
61 -}  
62 -/* 结束时间 */  
63 -  
64 -.jssj{  
65 - padding-left: 10rpx;  
66 - margin-left: 30rpx;  
67 -padding-bottom: 10rpx;  
68 -height: 35rpx;  
69 -font-size: 25rpx;  
70 -color: #333;  
71 -background-color: #EEEEEE;  
72 -border: 1px solid #DADADA;  
73 -width:85%;  
74 -font-family: 'SimHei',Arial;  
75 -border-radius: 3px;  
76 -}  
77 -/* 查询内容的备考的边框 */  
78 -.xknr-rim{  
79 - display: flex;  
80 - width: 100%;  
81 - height: 55rpx;  
82 - line-height:105rpx;  
83 - margin-top:10rpx;  
84 -  
85 -}  
86 -/* 明细查询 */  
87 -.botton{  
88 - margin-left: 30rpx;  
89 - margin-top: 63rpx;  
90 - background-color: #C4182E;  
91 - width: 95%;  
92 - border-radius:10rpx;  
93 - text-align: center;  
94 - height: 70rpx;  
95 - line-height: 70rpx;  
96 - color: #FFF;  
97 - font-size: 25rpx;  
98 - border: none;  
99 - font-family: '微软雅黑';  
100 - }  
101 - /* 底部边框线  
102 - .bottom{  
103 - width: 100%;  
104 - border-bottom: 20rpx solid #eeeeee;  
105 - } */  
106 - /* 清空按钮的 边框*/  
107 -.qc-rim{  
108 - position:absolute;  
109 - top:10rpx;  
110 - left:175rpx;  
111 -}  
112 -  
113 -/*开始时间清空输入框的按钮*/  
114 -.empty{  
115 - width: 25rpx;  
116 - height: 25rpx;  
117 - border-radius:50%;  
118 - background: #767676;  
119 - color: #fff;  
120 - font-size: 25rpx;  
121 - text-align: center;  
122 - line-height:18rpx;  
123 -}  
124 -/* 结束时间清空输入框的按钮的边框 */  
125 -.end-rim{  
126 -position: absolute;  
127 - top: 11rpx;  
128 - left:173rpx;  
129 - width: 25rpx;  
130 - height: 25rpx;  
131 -}  
132 -/*结束时间清空输入框的按钮*/  
133 -.end{  
134 -  
135 - width: 25rpx;  
136 - height: 25rpx;  
137 - border-radius:50%;  
138 - background: #767676;  
139 - color: #fff;  
140 - font-size: 25rpx;  
141 - text-align: center;  
142 - line-height:21rpx;  
143 -  
144 -}  
145 -  
146 -/* 顶部 */  
147 -.top{  
148 - width: 200rpx;  
149 - height: 50rpx;  
150 - padding: 0 10rpx;  
151 - line-height: 50rpx;  
152 - font-size: 34rpx;  
153 - margin-top: 25rpx;  
154 -  
155 -  
156 -}  
157 -.images{  
158 - width:35rpx;  
159 -height:30rpx;  
160 -margin-top:10rpx;  
161 -margin-left:-14rpx;  
162 -  
163 -}  
164 -.rim-images{  
165 - width: 45rpx;  
166 - height: 46rpx;  
167 - line-height: 37rpx;  
168 - /* border-style: inset;padding:4rpx;text-align: center; */  
169 - background: #f1f1f1;  
170 - border-color:#000000;  
171 - border-width: 1rpx;  
172 - transform:translateX(28%);  
173 - margin-top:-3rpx;  
174 -border-radius:5rpx;  
175 -  
176 -  
177 -}  
178 -/* 下拉框 */  
179 -.top-selected{  
180 - width: 100%;  
181 - display: flex;  
182 - align-items: center;  
183 - justify-content: space-between;  
184 - border: 1px solid #ccc;  
185 - padding: 0 10rpx;  
186 - font-size: 30rpx;  
187 - background:#eeeeee;  
188 - height:50rpx;  
189 - border-radius:6rpx;  
190 -}  
191 -.texts{  
192 - margin:0 auto;  
193 - font-size: 25rpx;  
194 -  
195 -}  
196 -/* 下拉内容 */  
197 -.select-box {  
198 - background-color: #eeeeee;  
199 - width:225rpx;  
200 - position: relative;  
201 - z-index:1;  
202 - overflow: hidden;  
203 - text-align: left;  
204 - animation: myfirst 0.5s;  
205 - font-size: 25rpx;  
206 -}  
207 -.select_one {  
208 - padding-left: 20rpx;  
209 - width: 100%;  
210 - height: 60rpx;  
211 - line-height: 60rpx;  
212 -}  
213 -/* 优惠券样式 */  
214 -.body{  
215 - text-align: center;  
216 - padding: 20rpx;  
217 - margin: 20rpx auto;  
218 - width: 80%;  
219 - max-width: 1000rpx;  
220 - font-size: 28rpx;  
221 - color: #333333;  
222 - border-bottom: 2rpx solid #EEEEEE;  
223 -}  
224 -  
225 -.b_iimg{  
226 - background-color: red;  
227 - width: 400rpx;  
228 - height: 400rpx;  
229 -}  
230 -  
231 -.b_sz2{  
232 - font-size: 40rpx;  
233 - color: #6fd137;  
234 - margin: 20rpx 0;  
235 - text-align: center;  
236 -}  
237 -/* 二维码列表查询 */  
238 -/* 列表数据*/  
239 -.data{  
240 - width: 80%;  
241 -  
242 - height:auto;  
243 - margin-left:80rpx;  
244 -  
245 -}  
246 -.rim{  
247 - position: relative;  
248 - top:0rpx;  
249 - left: 0rpx;  
250 -}  
251 -/* 二维码边框 */  
252 -.code_rim{  
253 - width: 100%;  
254 - height: auto;  
255 - text-align: center;  
256 - font-size: 25rpx;  
257 - padding-top: -30rpx;  
258 - margin-top:-20rpx;  
259 -padding-left:45rpx;  
260 -  
261 -}  
262 -  
263 -/* 二维码 */  
264 -.code{  
265 - height: 520rpx;  
266 - display: flex;  
267 - flex-direction: column;  
268 - justify-content: flex-end;  
269 - align-items: center;  
270 - margin-left:40rpx;  
271 -  
272 -}  
273 -.car-rim{  
274 -width:98%;  
275 -height:177rpx;  
276 -text-align:center;  
277 -border-bottom:2rpx solid #eee;  
278 -margin-left:22rpx;  
279 -  
280 -}  
281 -/* 二维码值 */  
282 -.code_val{  
283 - margin-top:-104rpx;  
284 -margin-left:-59rpx;  
285 -color:#999999;  
286 -  
287 -}  
288 -/* 金额 */  
289 -.moneys{  
290 - margin-top:20rpx;  
291 - height: 47rpx;  
292 - width: 100%;  
293 - color:#6fd137;  
294 - text-align: center;  
295 - font-size: 38rpx;  
296 - font-family: 'SimHei',Arial;  
297 - margin-bottom:20rpx;  
298 - margin-left:11rpx;  
299 -  
300 -}  
301 -/* 文字 */  
302 -.text{  
303 - width: 100%;  
304 - font-size: 25rpx;  
305 - text-align: center;  
306 -  
307 - height: 41rpx;  
308 - color: #999999;  
309 -}  
310 -/* 二维码和条形码的边框 */  
311 -.barqrcode{  
312 - width: 100%;  
313 - height: auto;  
314 - margin-top:50rpx;  
315 -  
316 -}  
317 -/* 日期 */  
318 -.rq{  
319 - height: 25rpx;  
320 - font-size: 28rpx;  
321 - margin-top:12rpx;  
322 - font-family:'SimHei',Arial;  
323 -}  
324 -/* 点击条形 */  
325 -.bar-container {  
326 - padding: 40rpx 20rpx 20rpx 20rpx;  
327 -}  
328 -.barcode {  
329 - width: 100%;  
330 - height: 100rpx;  
331 -}  
332 -/* 二维码边框*/  
333 -.qrcode_rim {  
334 - width: 100%;  
335 - height: 420rpx;  
336 - display: flex;  
337 - flex-direction: column;  
338 - justify-content: flex-end;  
339 - align-items: center;  
340 - margin-left: 80rpx;  
341 - margin-top:-210rpx;  
342 -  
343 -}  
344 -.qrcode{  
345 - /* margin-left: 100rpx; */  
346 -}  
347 -/* 使用说明 */  
348 -.textss{  
349 - width: 100%;  
350 - font-size: 25rpx;  
351 - text-align: center;  
352 -  
353 - min-height: 47rpx;  
354 - height:auto;  
355 - color: #999999;  
356 -}  
357 -  
358 -  
359 -  
360 -  
361 -  
362 -  
363 -page {  
364 - background-color: #f0f0f0;  
365 - scroll-behavior: smooth;  
366 -}  
367 -  
368 -.c-fe0000 {  
369 - color: #fe0000;  
370 -}  
371 -  
372 -.tab-head {  
373 - display: flex;  
374 - position: sticky;  
375 - top: 0;  
376 - background-color: white;  
377 - font-size: 28rpx;  
378 - z-index: 2;  
379 -}  
380 -  
381 -.tab-head-item {  
382 - flex: 1;  
383 - text-align: center;  
384 - padding: 30rpx 0;  
385 - position: relative;  
386 -}  
387 -  
388 -.tab-head-item.active {  
389 - color: #fe0000;  
390 -}  
391 -  
392 -.tab-head-item.active::after {  
393 - content: '';  
394 - width: 60%;  
395 - height: 4rpx;  
396 - background-color: #fe0000;  
397 - position: absolute;  
398 - bottom: 0;  
399 - left: 50%;  
400 - transform: translateX(-50%);  
401 -}  
402 -  
403 -.tab-body {  
404 - padding: 0 20rpx;  
405 - overflow: hidden;  
406 -}  
407 -  
408 - .tab-list-item {  
409 - border-radius: 10rpx;  
410 - overflow: hidden;  
411 - margin-top: 30rpx;  
412 - }  
413 -  
414 -  
415 -  
416 -.coupon {  
417 - position: relative;  
418 -  
419 - background: -webkit-radial-gradient(transparent 0, #FFD3D6 0) top left / 200rpx 100% no-repeat,  
420 - -webkit-radial-gradient(transparent 12rpx, #fff 0),  
421 - -webkit-radial-gradient(transparent 12rpx, #fff 0);  
422 - background: -moz-radial-gradient(transparent 0, #FFD3D6 0) top left / 200rpx 100% no-repeat,  
423 - -moz-radial-gradient(transparent 12rpx, #fff 0),  
424 - -moz-radial-gradient(transparent 12rpx, #fff 0);  
425 - background: -o-radial-gradient(transparent 0, #FFD3D6 0) top left / 200rpx 100% no-repeat,  
426 - -o-radial-gradient(transparent 12rpx, #fff 0),  
427 - -o-radial-gradient(transparent 12rpx, #fff 0);  
428 - background: radial-gradient(transparent 0, #FFD3D6 0) top left / 200rpx 100% no-repeat,  
429 - radial-gradient(transparent 12rpx, #fff 0),  
430 - radial-gradient(transparent 12rpx, #fff 0);  
431 -}  
432 -  
433 -  
434 -.coupon::after {  
435 - content: '';  
436 - position: absolute;  
437 - height: 100%;  
438 - width: 8rpx;  
439 - top: 0;  
440 - left: 0;  
441 -  
442 - background: -webkit-linear-gradient(to bottom, #FFD3D6 8rpx, transparent 8rpx, transparent),  
443 - -webkit-radial-gradient(16rpx circle at 0rpx 16rpx, #f0f0f0 8rpx, #FFD3D6 8rpx);  
444 -  
445 - background: -moz-linear-gradient(to bottom, #FFD3D6 8rpx, transparent 8rpx, transparent),  
446 - -moz-radial-gradient(16rpx circle at 0rpx 16rpx, #f0f0f0 8rpx, #FFD3D6 8rpx);  
447 -  
448 - background: -o-linear-gradient(to bottom, #FFD3D6 8rpx, transparent 8rpx, transparent),  
449 - -o-radial-gradient(16rpx circle at 0rpx 16rpx, #f0f0f0 8rpx, #FFD3D6 8rpx);  
450 -  
451 - background: linear-gradient(to bottom, #FFD3D6 8rpx, transparent 8rpx, transparent),  
452 - radial-gradient(16rpx circle at 0rpx 16rpx, #f0f0f0 8rpx, #FFD3D6 8rpx);  
453 -  
454 - background-size: 16rpx 24rpx;  
455 - background-repeat: repeat-y;  
456 - }  
457 -  
458 -  
459 - .coupon2 {  
460 - /* width: 300px; */  
461 - padding: 40rpx 0;  
462 - position: relative;  
463 - background: -webkit-radial-gradient(circle at right top, transparent 16rpx, #FFD3D6 0) top left / 200rpx 51% no-repeat,  
464 - -webkit-radial-gradient(circle at right bottom, transparent 16rpx, #FFD3D6 0) bottom left /200rpx 51% no-repeat,  
465 - -webkit-radial-gradient(circle at left top, transparent 16rpx, white 0) top right /calc(100% - 200rpx) 51% no-repeat,  
466 - -webkit-radial-gradient(circle at left bottom, transparent 16rpx, white 0) bottom right /calc(100% - 200rpx) 51% no-repeat;  
467 - background: -moz-radial-gradient(circle at right top, transparent 16rpx, #FFD3D6 0) top left / 200rpx 51% no-repeat,  
468 - -moz-radial-gradient(circle at right bottom, transparent 16rpx, #FFD3D6 0) bottom left /200rpx 51% no-repeat,  
469 - -moz-radial-gradient(circle at left top, transparent 16rpx, white 0) top right /calc(100% - 200rpx) 51% no-repeat,  
470 - -moz-radial-gradient(circle at left bottom, transparent 16rpx, white 0) bottom right /calc(100% - 200rpx) 51% no-repeat;  
471 - background: -o-radial-gradient(circle at right top, transparent 16rpx, #FFD3D6 0) top left / 200rpx 51% no-repeat,  
472 - -o-radial-gradient(circle at right bottom, transparent 16rpx, #FFD3D6 0) bottom left /200rpx 51% no-repeat,  
473 - -o-radial-gradient(circle at left top, transparent 16rpx, white 0) top right /calc(100% - 200rpx) 51% no-repeat,  
474 - -o-radial-gradient(circle at left bottom, transparent 16rpx, white 0) bottom right /calc(100% - 200rpx) 51% no-repeat;  
475 - background: radial-gradient(circle at right top, transparent 16rpx, #FFD3D6 0) top left / 200rpx 51% no-repeat,  
476 - radial-gradient(circle at right bottom, transparent 16rpx, #FFD3D6 0) bottom left /200rpx 51% no-repeat,  
477 - radial-gradient(circle at left top, transparent 16rpx, white 0) top right /calc(100% - 200rpx) 51% no-repeat,  
478 - radial-gradient(circle at left bottom, transparent 16rpx, white 0) bottom right /calc(100% - 200rpx) 51% no-repeat;  
479 - /* filter: drop-shadow(2px 2px 2px rgba(0,0,0,.2)); */  
480 - }  
481 -  
482 - .coupon2::after {  
483 - content: '';  
484 - height: 70%;  
485 - border: 2rpx dashed #fff;  
486 - position: absolute;  
487 - left: 198rpx;  
488 - top: 0;  
489 - bottom: 0;  
490 - margin: auto;  
491 - }  
492 -  
493 -/* .coupon2 .c-l,  
494 - .coupon2 .c-r {  
495 - border: 2rpx solid red;  
496 - padding: 20rpx 0;  
497 - } */  
498 -  
499 -  
500 -  
501 - .c-l {  
502 - color: #fe0000;  
503 - width: 200rpx;  
504 - display: flex;  
505 - align-items: center;  
506 - justify-content: center;  
507 - flex-shrink: 0;  
508 - }  
509 -  
510 - .rmb::before {  
511 - content: '¥';  
512 - font-size: 28rpx;  
513 - }  
514 -  
515 - .c-r {  
516 - box-sizing: border-box;  
517 - padding: 20rpx;  
518 - flex: 1;  
519 - }  
520 -  
521 - .c-time {  
522 - color: #7b7b7b;  
523 - font-size: 24rpx;  
524 - padding-top: 10rpx;  
525 - word-break: break-all;  
526 - }  
527 -  
528 - .btn, .btn2 {  
529 - font-size: 26rpx;  
530 - padding: 10rpx 20rpx;  
531 - border: 2rpx solid #fe0000;  
532 - border-radius: 30rpx;  
533 - flex-shrink: 0;  
534 - }  
535 -  
536 - .btn {  
537 - color: #fe0000;  
538 - }  
539 -  
540 - .btn.gray {  
541 - color: #ccc;  
542 - border-color: #ccc;  
543 - }  
544 -  
545 - .btn2 {  
546 - color: white;  
547 - background-color: #fe0000;  
548 - }  
549 -  
550 - .c-info {  
551 - border-top: 2rpx dashed #f0f0f0;  
552 - padding: 10rpx 40rpx 10rpx 10rpx;  
553 - font-size: 22rpx;  
554 - background-color: #fefefe;  
555 - color: #7b7b7b;  
556 - position: relative;  
557 - }  
558 -  
559 - .arrow-down::after {  
560 - font-family: iconfont;  
561 - content: '\e600';  
562 - font-size: 32rpx;  
563 - position: absolute;  
564 - right: 10rpx;  
565 - top: 2rpx;  
566 - /* transform: translateY(-50%); */  
567 - transition: all 0.3s;  
568 - }  
569 -  
570 - .arrow-down.active::after {  
571 - transform: rotateZ(180deg);  
572 - }  
573 -  
574 - .mask {  
575 - position: fixed;  
576 - width: 100%;  
577 - height: 100%;  
578 - top: 0;  
579 - background-color: rgba(0,0,0,.7);  
580 - z-index: 1;  
581 - }  
582 -  
583 - .popup-container {  
584 - position: fixed;  
585 - width: 70%;  
586 - border-radius: 12rpx;  
587 - top: 50%;  
588 - left: 50%;  
589 - transform: translate(-50%, -50%);  
590 - z-index: 3;  
591 - }  
592 -  
593 - .popup {  
594 - text-align: center;  
595 - border-radius: 12rpx;  
596 - background-color: white;  
597 - overflow: hidden;  
598 - /* width: 80%; */  
599 - }  
600 -  
601 - .popup-container .icon-close {  
602 - color: rgba(255,255,255,.6);  
603 - }  
604 -  
605 - .popup-title {  
606 - padding: 40rpx 0;  
607 - color: #fe0000;  
608 - background-color: #FFD3D6;  
609 - position: relative;  
610 - }  
611 -  
612 - .popup-title::after {  
613 - content: '';  
614 - position: absolute;  
615 - left: -20rpx;  
616 - bottom: -12rpx;  
617 - width: 130%;  
618 - height: 20rpx;  
619 - background: -webkit-radial-gradient(circle, #FFD3D6, #FFD3D6 20rpx, transparent 20rpx, transparent);  
620 - background: -moz-radial-gradient(circle, #FFD3D6, #FFD3D6 20rpx, transparent 20rpx, transparent);  
621 - background: -o-radial-gradient(circle, #FFD3D6, #FFD3D6 20rpx, transparent 20rpx, transparent);  
622 - background: radial-gradient(circle, #FFD3D6, #FFD3D6 20rpx, transparent 20rpx, transparent);  
623 - background-size: 40rpx 40rpx;  
624 - transform: rotate(180deg);  
625 - -webkit-transform: rotate(180deg);  
626 - }  
627 -  
628 -  
629 - .popup .rmb::before {  
630 - font-size: 40rpx;  
631 - }  
632 -  
633 - .img-qr {  
634 - display: block;  
635 - width: 300rpx;  
636 - height: 300rpx;  
637 - margin: 0 auto;  
638 - background-color: pink;  
639 - }  
640 -  
641 - .qrcode {  
642 - width: 300rpx;  
643 - height: 300rpx;  
644 - margin: 0 auto;  
645 - }  
646 -  
647 -  
648 - .noMore {  
649 - padding: 20rpx;  
650 - color: #bbb;  
651 - text-align: center;  
652 - font-size: 22rpx;  
653 - }  
654 -  
655 - .breakall {  
656 - word-break: break-all;  
657 - }  
658 -  
659 - /* .disableScroll {  
660 - position: fixed;  
661 - top: 0;  
662 - left: 0;  
663 - width: 100%;  
664 - height: 100%;  
665 - } */  
666 -  
667 -  
668 -  
669 -  
670 -  
671 -  
672 -  
673 -  
674 -  
675 -  
676 -  
677 -  
678 -  
679 -  
680 -  
681 -  
pages/user/coupons/filter.wxs deleted
1 -var numFr = {  
2 - getNum: function(x) {  
3 - var f = parseFloat(x);  
4 - if (isNaN(f)) {  
5 - return false;  
6 - }  
7 - var f = Math.round(x * 100) / 100;  
8 - var s = f.toString();  
9 - var rs = s.indexOf('.');  
10 - if (rs < 0) {  
11 - rs = s.length;  
12 - s += '.';  
13 - }  
14 - while (s.length <= rs + 2) {  
15 - s += '0';  
16 - }  
17 - return f;  
18 - },  
19 - showBtnText: function(index) {  
20 - switch(index) {  
21 - case 1: {  
22 - return '已使用';  
23 - break;  
24 - };  
25 - case 2: {  
26 - return '已过期';  
27 - break;  
28 - };  
29 - default: {  
30 - return '立即使用';  
31 - };  
32 - };  
33 - },  
34 -}  
35 -module.exports = {  
36 - getNum: numFr.getNum,  
37 - showBtnText: numFr.showBtnText,  
38 -}  
39 \ No newline at end of file 0 \ No newline at end of file
pages/user/deposit/deposit.js deleted
1 -var t = getApp(),  
2 - a = t.request,  
3 - o = t.globalData.setting,  
4 - os = o,  
5 - i = require("../../../utils/util.js"),  
6 - ut = i,  
7 - s = require("../../../utils/common.js");  
8 -var regeneratorRuntime = require('../../../utils/runtime.js');  
9 -Page({  
10 - data:{  
11 - yucun_money:0,  
12 - parameter:true,  
13 - iurl: o.imghost,  
14 - is_show_yckcz:0,  
15 - },  
16 - /**  
17 - * 生命周期函数--监听页面显示  
18 - */  
19 - onShow: function () {  
20 - // --先判断会员状态--  
21 - var user_info = getApp().globalData.userInfo;  
22 - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {  
23 - wx.navigateTo({ url: '/pages/togoin/togoin', })  
24 - return false;  
25 - }  
26 - wx.setNavigationBarTitle({  
27 - title: "预存款",  
28 - })  
29 -  
30 - var th = this;  
31 - getApp().getConfig2(function (ee) {  
32 - var json_d = JSON.parse(ee.switch_list);  
33 - th.setData({ is_show_yckcz: json_d.yckcz_switch });  
34 - },1)  
35 - },  
36 -  
37 - /**  
38 - * 生命周期函数--监听页面初次渲染完成  
39 - */  
40 - onReady: function () {  
41 - this.yuck();  
42 - },  
43 - //预存款  
44 - async yuck(){  
45 - var user_id =getApp().globalData.user_id;  
46 - var store_id = os.stoid;  
47 - console.log(user_id, "有进来吗银行卡", store_id);  
48 -  
49 - await getApp().request.promiseGet("/api/weshop/users/listYuMoney", {  
50 - data: { user_id: user_id, store_id: store_id }  
51 - }).then(res => {  
52 - var a = res.data;  
53 - console.log("在这了",a);  
54 - var yucun_money = a.data.yucun_money;  
55 - var list= a.data.list1;  
56 - if (list.length != 0){  
57 - console.log(list, "s1w" + yucun_money);  
58 - list=list.map(item=>{  
59 - item['EndDate']=item['EndDate'].replace('00:00:00','23:59:59');  
60 - return item;  
61 - });  
62 - this.setData({ yucun_money: yucun_money, list: list, parameter: false });  
63 - }else{  
64 - console.log("在这里111", list.length);  
65 - this.setData({ parameter:true});  
66 - }  
67 -  
68 - })  
69 -  
70 - },  
71 -  
72 - jumPage: function () {  
73 - wx.navigateTo({  
74 - url: 'prepaid/prepaid',  
75 -  
76 - })  
77 - },  
78 - /**  
79 - * 生命周期函数--监听页面加载  
80 - */  
81 - onLoad: function (options) {  
82 -  
83 - },  
84 -})  
pages/user/deposit/deposit.json deleted
1 -{}  
2 \ No newline at end of file 0 \ No newline at end of file
pages/user/deposit/deposit.wxml deleted
1 -<image class="pictuer" src='{{iurl}}/miniapp/images/usermoney/100.jpg'>  
2 - <view class="big">  
3 - <view class="font-one">预存款</view>  
4 - <view class="deposit">  
5 - <view class="rmb" >¥</view><view class="font-two">{{yucun_money}}</view>  
6 -</view>  
7 - </view>  
8 -</image>  
9 -<view class="big-rim">  
10 - <view wx:if="{{is_show_yckcz}}" class="min-rim-one" type='primary' bindtap='jumPage'>  
11 - <image class="picture-two" src="{{iurl}}/miniapp/images/usermoney/recharge.png"></image>  
12 - <view class="ldzj-font">预存款充值</view>  
13 - <image class="picture-five" src="{{iurl}}/miniapp/images/usermoney/left.png"></image>  
14 - </view>  
15 -</view>  
16 -  
17 -<view class="min-rim-one" type='primary'>  
18 - <image class="picture-two" src="{{iurl}}/miniapp/images/usermoney/deposit.png"></image>  
19 - <view class="ldzj-font">预存款余额</view>  
20 -</view>  
21 -  
22 -  
23 -<view wx:if="{{parameter}}">  
24 -  
25 - <view class="mysj">暂无任何预存款</view>  
26 -</view>  
27 -<view wx:else>  
28 -<block wx:for="{{list}}" wx:for-index="idx" wx:for-item="list">  
29 - <view class="rim_one">  
30 - <view class="top_rim">{{list.ItemName}}</view>  
31 - <view class="bottom_rim">  
32 - <view class="bottom_one">¥{{list.Balance}}</view>  
33 - <view class="bottom_two" >注:截止日期:  
34 - {{list.EndDate==null?"不限":list.EndDate}}</view>  
35 -  
36 - </view>  
37 - </view>  
38 - </block>  
39 -</view>  
40 \ No newline at end of file 0 \ No newline at end of file
pages/user/deposit/deposit.wxss deleted
1 -/* 图片 */  
2 -.pictuer{  
3 - position:relative;  
4 - top:0rpx;  
5 - left:0rpx;  
6 - width: 100%;  
7 - height: 180rpx;  
8 -}  
9 -/* 资产的大边框 */  
10 -.big{  
11 - color: #FFFFFF;  
12 - position: absolute;  
13 - top: 30rpx;  
14 - left: 45rpx;  
15 - width: 665rpx;  
16 - height:auto;  
17 -}  
18 -/* 总资产 */  
19 -.font-one{  
20 -font-size:28rpx;  
21 -text-align: left;  
22 -height: 50rpx;  
23 -line-height:50rpx;  
24 -}  
25 -/* 人民币符号 */  
26 -.rmb{  
27 - display: flex;  
28 - width: 27rpx;  
29 - height: 41rpx;  
30 - font-size:25rpx;  
31 - margin-top:20rpx;  
32 -}  
33 -/* 资产金额 */  
34 -.font-two{  
35 - width: 100rpx;  
36 - height:35rpx;  
37 - font-size:25rpx;  
38 - font-family: 'SimHei',Arial;  
39 - margin-top:24rpx;  
40 -padding-top:4rpx;  
41 -  
42 -}  
43 -/* 流动资金的边框 */  
44 -.min-rim-one{  
45 - display: flex;  
46 - width: 100%;  
47 - height:80rpx;  
48 - line-height: 80rpx;  
49 - border-bottom: 1px solid #EEEEEE;  
50 -}  
51 -/* 预存款 */  
52 -.deposit{  
53 -display: flex;  
54 -widows: 150rpx;  
55 -height: 35rpx;  
56 -  
57 -  
58 -  
59 -}  
60 -/* 流动资金的小图片 */  
61 -.picture-two{  
62 - margin-top:25rpx;  
63 - width: 45rpx;  
64 - height: 35rpx;  
65 - margin-left: 20rpx;  
66 -}  
67 -/* 流动资金 */  
68 -.ldzj-font{  
69 - width: 200rpx;  
70 - font-size: 25rpx;  
71 - margin-left: 20rpx;  
72 - color: #000000;  
73 -}  
74 -.picture-three{  
75 - margin-top:40rpx;  
76 - margin-left: 380rpx;  
77 - height: 30rpx;  
78 - width: 20rpx;  
79 -}  
80 -.picture-five{  
81 - margin-top:25rpx;  
82 - margin-left: 420rpx;  
83 - height: 30rpx;  
84 - width: 20rpx;  
85 -}  
86 -.big-rim{  
87 - width: 100%;  
88 - height: auto;  
89 - font-family: 'SimHei',Arial;  
90 - font-size: 35rpx;  
91 - color: #000000;  
92 - line-height: 60rpx;  
93 -}  
94 -  
95 -  
96 -.mysj{  
97 - width: 100%;  
98 - height: 70rpx;  
99 - font-size: 25rpx;  
100 - text-align: center;  
101 - color:#000000;  
102 - margin-top:20rpx;  
103 -}  
104 -/*数据*/  
105 - .data{  
106 - display: flex;  
107 - width: 100%;  
108 - border-bottom: 1px solid #E8E8E8;  
109 - height: 120rpx;  
110 -}  
111 -/*左边的数据 */  
112 -.left{  
113 - width:70%;  
114 - height: 120rpx;  
115 -}  
116 -/* 单据单号 */  
117 -.left-test{  
118 - margin-left: 30rpx;  
119 - padding-top: 20rpx;  
120 - font-size: 35rpx;  
121 - color: #000000;  
122 - width: 100%;  
123 -}  
124 -/* 单据时间 */  
125 -.time{  
126 - margin-top: 10rpx;  
127 - font-size: 25rpx;  
128 - color: #999999;  
129 - width: 100%;  
130 -}  
131 -/* 流动资金的加减 */  
132 -.money{  
133 - padding-top:20rpx;  
134 - height: 70rpx;  
135 - width: 110rpx;  
136 - margin-left:130rpx;  
137 - font-size: 35rpx;  
138 - font-family: 'SimHei',Arial;  
139 -}  
140 -  
141 -/* 有数据的时候的大边框样式 */  
142 -.rim_one{  
143 -margin:20rpx auto;  
144 -width: 90%;  
145 -background: #fbc8b7;  
146 -height: 250rpx;  
147 -text-align: left;  
148 -border-radius: 10rpx;  
149 -}  
150 -/* 上边框 */  
151 -.top_rim{  
152 - width:80%;  
153 - font-family: 'SimHei',Arial;  
154 - padding: 0 45rpx;  
155 - margin:0 auto;  
156 - color: #fff;  
157 - font-size: 45rpx;  
158 - height: 100rpx;  
159 - line-height: 100rpx;  
160 - border-bottom: 1px dashed #FFFFFF;  
161 -}  
162 -/* 下边框 */  
163 -.bottom_rim{  
164 - width:80%;  
165 - height: 150rpx;  
166 - padding: 0 45rpx;  
167 - line-height: 150rpx;  
168 - margin:0 auto;  
169 -}  
170 -/* 下边框中的钱 */  
171 -.bottom_one{  
172 - font-size: 35rpx;  
173 - width:80%;  
174 - height:70rpx;  
175 - line-height: 250%;  
176 - font-family: 'SimHei',Arial;  
177 - color: #fff;  
178 -  
179 -}  
180 -.bottom_two{  
181 - font-size: 28rpx;  
182 - width:80%;  
183 - height: 80rpx;  
184 - line-height:120%;  
185 - font-family: 'SimHei',Arial;  
186 - color: #fff;  
187 -}  
188 \ No newline at end of file 0 \ No newline at end of file
pages/user/deposit/prepaid/fil.wxs deleted
1 -function set_word(word){  
2 - if(!word) return '';  
3 - if(word.indexOf('复核')!==-1) return '';  
4 - return word;  
5 -}  
6 -  
7 -module.exports = {  
8 - set_word: set_word  
9 -}  
10 \ No newline at end of file 0 \ No newline at end of file
pages/user/deposit/prepaid/msg/msg.js deleted
1 -// pages/user/member/bring/msg/msg.js  
2 -var t = getApp(),o = t.globalData.setting,os = o;  
3 -Page({  
4 -  
5 - /**  
6 - * 页面的初始数据  
7 - */  
8 - data: {  
9 - // timer: '',//定时器名字  
10 - // countDownNum: '3'//倒计时初始值  
11 - iurl: o.imghost,  
12 - },  
13 -  
14 -  
15 - /**  
16 - * 生命周期函数--监听页面加载  
17 - */  
18 - onLoad: function (options) {  
19 -  
20 - },  
21 -  
22 - /**  
23 - * 生命周期函数--监听页面初次渲染完成  
24 - */  
25 - onReady: function () {  
26 -  
27 - },  
28 -  
29 - /**  
30 - * 生命周期函数--监听页面显示  
31 - */  
32 - onShow: function () {  
33 - getApp().check_can_share();  
34 - wx.setNavigationBarTitle({  
35 - title: "支付成功",  
36 - })  
37 - },  
38 - // countDown: function () {  
39 - // let that = this;  
40 - // let countDownNum = that.data.countDownNum;//获取倒计时初始值  
41 - // //如果将定时器设置在外面,那么用户就看不到countDownNum的数值动态变化,所以要把定时器存进data里面  
42 - // that.setData({  
43 - // timer: setInterval(function () {//这里把setInterval赋值给变量名为timer的变量  
44 - // //每隔一秒countDownNum就减一,实现同步  
45 - // countDownNum--;  
46 - // //然后把countDownNum存进data,好让用户知道时间在倒计着  
47 - // that.setData({  
48 - // countDownNum: countDownNum  
49 - // })  
50 - // //在倒计时还未到0时,这中间可以做其他的事情,按项目需求来  
51 - // if (countDownNum == 0) {  
52 - // //这里特别要注意,计时器是始终一直在走的,如果你的时间为0,那么就要关掉定时器!不然相当耗性能  
53 - // //因为timer是存在data里面的,所以在关掉时,也要在data里取出后再关闭  
54 - // clearInterval(that.data.timer);  
55 - // //关闭定时器之后,可作其他处理codes go here  
56 - // //--跳到绑定页面--  
57 - // wx.navigateTo({  
58 - // url: '../../../integral/jf',  
59 - // })  
60 - // }  
61 - // }, 500)  
62 - // })  
63 -  
64 - click:function(){  
65 - wx.redirectTo({  
66 - //url: '../../../integral/jf',  
67 - url:'../../deposit',  
68 - })  
69 - },  
70 - homepage:function(){  
71 -  
72 - wx.navigateTo({  
73 - url: "../../../../index/index/index",  
74 - })  
75 - },  
76 -  
77 - /**  
78 - * 生命周期函数--监听页面隐藏  
79 - */  
80 - onHide: function () {  
81 -  
82 - },  
83 -  
84 - /**  
85 - * 生命周期函数--监听页面卸载  
86 - */  
87 - onUnload: function () {  
88 -  
89 - },  
90 -  
91 - /**  
92 - * 页面相关事件处理函数--监听用户下拉动作  
93 - */  
94 - onPullDownRefresh: function () {  
95 -  
96 - },  
97 -  
98 - /**  
99 - * 页面上拉触底事件的处理函数  
100 - */  
101 - onReachBottom: function () {  
102 -  
103 - },  
104 -  
105 - /**  
106 - * 用户点击右上角分享  
107 - */  
108 - onShareAppMessage: function () { getApp().globalData.no_clear=1  
109 -  
110 - }  
111 -})  
112 \ No newline at end of file 0 \ No newline at end of file
pages/user/deposit/prepaid/msg/msg.json deleted
1 -{  
2 - "usingComponents": {}  
3 -}  
4 \ No newline at end of file 0 \ No newline at end of file
pages/user/deposit/prepaid/msg/msg.wxml deleted
1 -<view class="rim">  
2 -  
3 -<view class="img"><image class="imgs"src="{{iurl}}/miniapp/images/usermoney/dd.png"></image></view>  
4 -<view class="zhon">  
5 -<view class="czcg">充值成功 </view>  
6 -<view class="itme">及时跟进订单信息哟!</view>  
7 -</view>  
8 -<view class="click">  
9 -<view class="top" bindtap='click'>继续购物</view>  
10 -<view class="hom-page"bindtap='homepage'>返回首页</view>  
11 -</view>  
12 -</view>  
pages/user/deposit/prepaid/msg/msg.wxss deleted
1 -/* 边框 */  
2 -.rim{  
3 - width: 100%;  
4 - height: auto;  
5 - text-align: center;  
6 -  
7 -}  
8 -  
9 -.imgs{  
10 - width:100rpx;  
11 - height:100rpx;  
12 - margin-top:20rpx;  
13 - margin-left:122rpx;  
14 -  
15 -}  
16 -/* 图片 */  
17 -.img{  
18 - width:110rpx;  
19 - height:110rpx;  
20 - margin: 40rpx 200rpx;  
21 - margin-right:60rpx;  
22 -  
23 -}  
24 -.zhon{  
25 - width: 100%;  
26 - height: 168rpx;  
27 - margin-top:-20rpx;  
28 -  
29 -}  
30 -.czcg{  
31 - width: 250rpx;  
32 - height: 135rpx;  
33 - color: #c4182e;  
34 - font-size: 50rpx;  
35 - font-family: 'SimHei',Arial;  
36 - margin-left:243rpx;  
37 - padding-top:20px;  
38 -  
39 -  
40 -}  
41 -/* 倒计时 */  
42 -.itme{  
43 - margin-top: -40rpx;  
44 -  
45 - width: 100%;  
46 - height: 50rpx;  
47 - color: #999;  
48 - font-family: 'SimHei',Arial;  
49 - font-size: 35rpx;  
50 -}  
51 -/* 按钮的边框 */  
52 -.click{  
53 - display: flex;  
54 - width: 100%;  
55 - height: 80rpx;  
56 -}  
57 -/* 返回上一页 */  
58 -.top{  
59 - margin-top: 30rpx;  
60 - background: #c4182e;  
61 - color: #fff;  
62 - text-align: center;  
63 - width: 45%;  
64 - height: 75rpx;  
65 - line-height: 75rpx;  
66 - border-radius:5px;  
67 - margin-left: 20rpx;  
68 - font-size: 32rpx;  
69 -}  
70 -.hom-page{  
71 - margin-top: 30rpx;  
72 - font-size: 32rpx;  
73 - background: #c4182e;  
74 - color: #fff;  
75 - text-align: center;  
76 - width: 45%;  
77 - height:75rpx;  
78 - line-height: 75rpx;  
79 - border-radius:5px;  
80 - margin-left: 40rpx;  
81 -}  
82 -  
pages/user/deposit/prepaid/prepaid.js deleted
1 -var t = getApp(),  
2 - a = t.request,  
3 - o = t.globalData.setting,  
4 - os = o,  
5 - i = require("../../../../utils/util.js"),  
6 - ut = i,  
7 - s = require("../../../../utils/common.js");  
8 -var regeneratorRuntime = require('../../../../utils/runtime.js');  
9 -Page({  
10 - data: {  
11 - iurl: o.imghost,  
12 - showModal: false, //弹框控制器  
13 - perpaid: [], //数据  
14 - },  
15 - /* 生命周期函数--监听页面初次渲染完成*/  
16 - onReady: function() {  
17 - var th=this;  
18 -  
19 - getApp().request.get("/api/wx/weappSendlist/page", {  
20 - data: {  
21 - store_id: os.stoid,  
22 - typeid: "1002"  
23 - },  
24 - success: function(res) {  
25 - if (res.data.code == 0 && res.data.data.pageData.length > 0) {  
26 - var template_id = res.data.data.pageData[0].template_id;  
27 - th.setData({template_id:template_id});  
28 - }  
29 - }  
30 - });  
31 -  
32 - this.yuck();  
33 - },  
34 - /*预存款的劵*/  
35 - async yuck() {  
36 - var user_id = getApp().globalData.user_id;  
37 - var store_id = os.stoid;  
38 - console.log(user_id, "有进来吗银行卡", store_id );  
39 - var e = this,  
40 - perpaid = "";  
41 - await getApp().request.promiseGet("/api/weshop/users/listYucun", {  
42 - data: {  
43 - user_id: user_id,  
44 - store_id: store_id  
45 - }  
46 - }).then(res => {  
47 - // console.log(res.data.data[0].BeginDate)  
48 - var perpaids = res.data.data;  
49 - // var perpaid = res.data.data;  
50 - console.log( "是什么", perpaids);  
51 - e.setData({  
52 - perpaid: perpaids  
53 - });  
54 - })  
55 -  
56 - },  
57 - //立即充值获取参数到弹框  
58 - submit: function(e) {  
59 - var money = e.target.dataset.name;  
60 - var s = e.target.dataset.money;  
61 - var advancek = e.target.dataset.advance;  
62 -  
63 - var item_type=e.target.dataset.item_type;  
64 - this.data.item_type=item_type;  
65 -  
66 - console.log("sss", e.target.dataset.name);  
67 - this.setData({  
68 - showModal: true  
69 - })  
70 - console.log("立即充值", s, "ss", o);  
71 - this.setData({  
72 - BeginSum: money,  
73 - NewSum: s,  
74 - adv: advancek  
75 - })  
76 - },  
77 - //弹窗的方法  
78 - preventTouchMove: function() {  
79 -  
80 - },  
81 - /**  
82 -* 生命周期函数--监听页面显示  
83 -*/  
84 - onShow: function () {  
85 - wx.setNavigationBarTitle({  
86 - title: "流动资金转预存",  
87 - })  
88 - },  
89 - //确定充值  
90 - determine: function(e) {  
91 - var th=this;  
92 - this.setData({  
93 - showModal: false  
94 - })  
95 - console.log("aaa");  
96 - var moneyone = e.target.dataset.moneyone;  
97 - var money = e.target.dataset.money;  
98 - var advancek = e.target.dataset.adv;  
99 -  
100 - this.sendsm(function(){  
101 - th.recharge(money, advancek);  
102 - })  
103 -  
104 - },  
105 - //确定接口  
106 - async recharge(money, advancek) {  
107 - console.log(money, "有进来吗银行卡", advancek);  
108 - var user_id = getApp().globalData.user_id;  
109 - var store_id = os.stoid;  
110 - var recharge_type = 0;  
111 - if(this.data.item_type==2) recharge_type=6;  
112 -  
113 - var buynum = 1;  
114 - console.log(money, "有进来吗预存劵", advancek, user_id, store_id );  
115 - var e = this,  
116 - perpaid = "";  
117 - await getApp().request.promiseGet("/api/weshop/users/getPay", {  
118 - data: {  
119 - account: money,  
120 - yucun_id: advancek,  
121 - user_id: user_id,  
122 - store_id: store_id,  
123 - recharge_type: recharge_type,  
124 - buynum: buynum ,  
125 - }  
126 - }).then(res => {  
127 - console.log(res);  
128 - var getcode=res.data.code;  
129 - if (getcode!=0)  
130 - {  
131 - wx.showModal({  
132 - title: '提示',  
133 - content:res.data.msg  
134 - });  
135 - return false;  
136 - }  
137 -  
138 -  
139 - var msg = res.data.data;  
140 - var parentSn = msg.order_sn;  
141 - var store_id = os.stoid;  
142 - getApp().request.post("/api/weshop/order/pay/createRechargeOrder", {  
143 - data: {  
144 - parentSn: parentSn,  
145 - store_id: store_id  
146 - },  
147 - success: function (su) {  
148 - console.log("su是什么",su);  
149 - var n=su.data.data;  
150 - console.log("su是什么", su);  
151 -  
152 - e.weixinPay(n,  
153 - function () {  
154 - e.jumpPaymentPage();  
155 - }, function () {  
156 - getApp().showWarning("支付失败");  
157 - })  
158 - }  
159 - })  
160 - })  
161 - },  
162 - //------支付成功页面--------  
163 - jumpPaymentPage: function () {  
164 - wx.redirectTo({  
165 - url:"msg/msg",  
166 - });  
167 - },  
168 -  
169 - //------调起支付框--------  
170 - weixinPay: function (n, success, fail) {  
171 - if(!n) return false;  
172 -  
173 - wx.requestPayment({  
174 - timeStamp: String(n.timeStamp),  
175 - nonceStr: n.nonceStr,  
176 - package: n.packageValue,  
177 - signType: n.signType,  
178 - paySign: n.paySign,  
179 - success: function (n) {  
180 - console.log(n), getApp().showSuccess("支付成功!");  
181 - "function" == typeof success && success();  
182 - wx.redirectTo({  
183 - url: "../deposit/deposit"  
184 - });  
185 - },  
186 - fail: function (n) {  
187 - console.log(n), "requestPayment:fail" == n.errMsg ? getApp().showWarning("支付失败") : "requestPayment:fail cancel" == n.errMsg ? getApp().showWarning("您已取消支付") : getApp().showWarning("支付失败:" + n.errMsg.substr("requestPayment:fail ".length)),  
188 - "function" == typeof fail && fail();  
189 - }  
190 - });  
191 - },  
192 - //关闭弹框  
193 - shut: function () {  
194 - this.setData({  
195 - showModal: false  
196 - })  
197 - console.log("bb");  
198 -  
199 - },  
200 -  
201 - go_detail:function(e){  
202 - var id=e.currentTarget.dataset.id;  
203 - getApp().goto('/packageA/pages/chongzhiDetails/chongzhiDetails?id=' + id);  
204 - },  
205 -  
206 -  
207 - //订阅消息提醒  
208 - sendsm:function(func)  
209 - {  
210 - var template_id = this.data.template_id;  
211 - // //授权订阅  
212 - wx.requestSubscribeMessage({  
213 - tmplIds: [template_id],  
214 - success(res) {  
215 - func();  
216 - },  
217 - fail(res) {  
218 - func();  
219 - }  
220 - })  
221 -  
222 - },  
223 -})  
pages/user/deposit/prepaid/prepaid.json deleted
1 -{  
2 - "usingComponents": {}  
3 -}  
4 \ No newline at end of file 0 \ No newline at end of file
pages/user/deposit/prepaid/prepaid.wxml deleted
1 -<wxs src="fil.wxs" module="fil"></wxs>  
2 -<block wx:for="{{perpaid}}" wx:for-index="idx" wx:for-item="perpaid">  
3 - <view class="coupon-container" wx:if="{{perpaid.NewSum>0 || perpaid.NewSum=='' }}">  
4 - <image wx:if="{{idx % 4 == 0}}" class="picture" src="{{iurl+'miniapp/images/usermoney/green.png'}}"></image>  
5 - <image wx:if="{{idx % 4 == 1}}" class="picture" src="{{iurl+'miniapp/images/usermoney/red.png'}}"></image>  
6 - <image wx:if="{{idx % 4 == 2}}" class="picture" src="{{iurl+'miniapp/images/usermoney/yellow.png'}}"></image>  
7 - <image wx:if="{{idx % 4 == 3}}" class="picture" src="{{iurl+'miniapp/images/usermoney/blue.png'}}"></image>  
8 - <view class="info-container flex">  
9 - <view class="left" >  
10 - <view>{{perpaid.ItemName}}</view>  
11 - <view class="pdv20">充{{perpaid.BeginSum}}  
12 - <text>送{{perpaid.NewSum}}元</text>  
13 - </view>  
14 - <view wx:if="{{perpaid.ItemType==2}}" catchtap="go_detail" data-id="{{perpaid.Id}}">充值送大礼 ></view>  
15 - </view>  
16 - <view class="right">备注:  
17 - <view class="">{{fil.set_word(perpaid.Remark)}}</view>  
18 - <view class="ljcz" bindtap="submit" data-name="{{perpaid.BeginSum}}" data-item_type="{{perpaid.ItemType}}"  
19 - data-advance="{{perpaid.Id}}" data-money="{{perpaid.NewSum}}">立即充值</view>  
20 - </view>  
21 - </view>  
22 -  
23 - <!-- <view class="rim"> -->  
24 - <!-- <view class="con">充{{perpaid.BeginSum}}<text>送{{perpaid.NewSum}}元</text></view> -->  
25 - <!-- <view class="qian">{{perpaid.BeginSum}}</view>  
26 - <view class="q-one" wx:if="{{perpaid.ItemType==1}}">送{{perpaid.NewSum}}元</view> -->  
27 - <!-- <view class="give" wx:if="{{perpaid.ItemType==2}}">充值送大礼 ></view> -->  
28 - <!-- </view> -->  
29 - <!-- <view class="bz">备注:  
30 - <view class="yck">{{perpaid.ItemName}}</view>  
31 - </view> -->  
32 - <!-- <view wx:if="{{perpaid.ItemType==1}}" class="ljcz" bindtap="submit" data-name="{{perpaid.BeginSum}}"  
33 - data-advance="{{perpaid.AdvanceItemId}}"data-money="{{perpaid.NewSum}}">立即充值</view>  
34 -  
35 - <view wx:if="{{perpaid.ItemType==2}}" class="ljcz" bindtap="go_detail" data-advance="{{perpaid.AdvanceItemId}}">立即充值</view> -->  
36 - </view>  
37 -  
38 -  
39 -</block>  
40 -  
41 - <view class="mask" catchtouchmove="preventTouchMove" wx:if="{{showModal}}"></view>  
42 - <view class="big-rim modalDlg" wx:if="{{showModal}}">  
43 - <view class="gb-rim" bindtap="shut">  
44 - <image class="imag" src="{{iurl}}/miniapp/images/usermoney/img.png"></image>  
45 - </view>  
46 - <view class="bk">  
47 - <view class="text">充{{BeginSum}}送{{NewSum}}元</view>  
48 - <view class="min-rim">  
49 - <view class="fh">¥</view>  
50 - <view class="value">{{BeginSum}}</view>  
51 - </view>  
52 - <button bindtap="determine" class="button" data-adv="{{adv}}" data-money='{{BeginSum}}' data-moneyone='{{NewSum}}' >确定</button>  
53 - </view>  
54 - </view>  
55 -  
56 -  
57 -<!-- <view> -->  
58 - <!-- 列表 -->  
59 - <!-- <view class="list"> -->  
60 - <!-- 列表项 -->  
61 - <!-- <view class="coupon"> -->  
62 - <!-- 左 -->  
63 - <!-- <view class="left">  
64 - <view>预存5折</view>  
65 - <view>充1000元</view>  
66 - <view>充值送大礼</view>  
67 - </view> -->  
68 - <!-- 右 -->  
69 - <!-- <view class="right">  
70 - <view>备注:</view>  
71 - <view>立即充值</view>  
72 - </view>  
73 - </view>  
74 - </view>  
75 -</view> -->  
pages/user/deposit/prepaid/prepaid.wxss deleted
1 -/* 图片 */  
2 -.picture{  
3 -/* margin-top: 5rpx; */  
4 -width:100%;  
5 -height:270rpx;  
6 -display: block;  
7 -}  
8 -/* 预存款扣款情况 */  
9 -.wz{  
10 - width: 50%;  
11 - margin-top:-240rpx;  
12 - margin-left:40rpx;  
13 - font-size:30rpx;  
14 - color: #FFFFFF;  
15 - text-align:center;  
16 - padding-top:3px;  
17 -  
18 -}  
19 -/* 充钱的边框 */  
20 -.rim{  
21 - padding-top:25rpx;  
22 - color: #FFFFFF;  
23 - display: flex;  
24 - width: 50%;  
25 - height: 60rpx;  
26 - margin:auto;  
27 - margin-left:80rpx;  
28 -}  
29 -.con{  
30 - padding-left: 30rpx;  
31 - font-size: 35rpx;  
32 -}  
33 -/* 钱 */  
34 -.qian{  
35 - margin-left: 5rpx;  
36 -  
37 - width: auto;  
38 - height: 50rpx;  
39 - font-size: 48rpx;  
40 - margin-top:-5rpx;  
41 - font-family: 'SimHei',Arial;  
42 -}  
43 -/* 送一百 */  
44 -.q-one{  
45 - margin-left:10rpx;  
46 - font-size:35rpx;  
47 -}  
48 -/* 备注 */  
49 -.bz{  
50 - width: 280rpx;  
51 - height: 124rpx;  
52 -margin-left: 475rpx;  
53 -margin-top: -120rpx;  
54 -font-size:28rpx;  
55 - border-bottom: 1px solid#d7d7d7;  
56 -}  
57 -/* 预存款扣款情况 */  
58 -.yck{  
59 - margin-top:15rpx;  
60 - font-size: 28rpx;  
61 - color: #999999;  
62 -}  
63 -/* 立即充值 */  
64 -.ljcz{  
65 - /* width: 2278rpx;  
66 - height: 111rpx;  
67 - font-size: 25rpx;  
68 - line-height: 320%;  
69 - color: #C4182E;  
70 - margin-left: 463rpx;  
71 - padding-left:66rpx; */  
72 - padding-top: 20rpx;  
73 - color: red;  
74 -}  
75 -/* 弹出框的大边框 */  
76 -.big-rim{  
77 - width: 100%;  
78 - height: 320rpx;  
79 -}  
80 -/* 关闭的边框 */  
81 -.gb-rim{  
82 - padding-top:30rpx;  
83 - width: 65rpx;  
84 - height: 65rpx;  
85 - margin-top: 0rpx;  
86 - margin-left: 660rpx;  
87 -}  
88 -/* 关闭的边框 */  
89 -.gb-rim {  
90 - padding-top: 33rpx;  
91 - width: 65rpx;  
92 - height: 65rpx;  
93 - margin-left: 675rpx;  
94 -}  
95 -/* 关闭的图片 */  
96 -  
97 -.imag {  
98 - width: 60rpx;  
99 - height: 60rpx;  
100 -}  
101 -  
102 -/* 圆 */  
103 -.yuan{  
104 - width:60rpx;  
105 - height:60rx;  
106 - border-radius:50%;  
107 - border:5rpx solid #7f7e88;  
108 -}  
109 -/* 圆里的值 */  
110 -.zhi{  
111 - height:55rpx;  
112 - line-height:55rpx;  
113 - display:block;  
114 - color:#7f7e88;  
115 - text-align:center;  
116 -}  
117 - /* 充1000送100的边框 */  
118 - .bk{  
119 - margin-left: 20rpx;  
120 - height: 108;  
121 - width: 280rpx;  
122 - margin-top:-20rpx;  
123 -  
124 - }  
125 - /* 充1000送100 */  
126 - .text{  
127 - width:300rpx;  
128 - font-size: 40rpx;  
129 - font-family: 'SimHei',Arial;  
130 -  
131 - }  
132 - /* ¥ */  
133 - .fh{  
134 - display:inline-block;  
135 - width:23rpx;  
136 - height: 35rpx;  
137 - font-size: 30rpx;  
138 - color: red;  
139 -  
140 - }  
141 - /* 100 */  
142 - .value{  
143 - color: red;  
144 - display:inline-block;  
145 - width: 90rpx;  
146 - height: 45rpx;  
147 - font-size: 40rpx;  
148 - font-family: 'SimHei',Arial;  
149 - }  
150 - /* 按钮 */  
151 - .button{  
152 - width: 710rpx;  
153 - height: 77rpx;  
154 - line-height: 285%;  
155 - margin-top:43rpx;  
156 - font-size: 27rpx;  
157 - color: #FFFFFF;  
158 - background-color: #C4182E;  
159 - font-family: 'SimHei',Arial;  
160 - text-align:center;  
161 - }  
162 -  
163 -/* 蒙层 */  
164 - .mask{  
165 - width: 100%;  
166 - height: 100%;  
167 - position: fixed;  
168 - top: 0;  
169 - left: 0;  
170 - background: #000;  
171 - z-index: 9000;  
172 - opacity: 0.1;  
173 -}  
174 -.modalDlg{  
175 - position: fixed;  
176 - z-index: 9999;  
177 - background-color: #fff;  
178 - border-radius: 10rpx;  
179 - flex-direction: column;  
180 - align-items: center;  
181 - bottom:0;  
182 - left:0;  
183 -}  
184 -  
185 -.give {  
186 - position: absolute;  
187 - margin-top: 70rpx;  
188 - margin-left: 60rpx;  
189 -}  
190 -  
191 -.list {  
192 - padding: 0 20rpx;  
193 -}  
194 -  
195 -.coupon {  
196 - box-sizing: border-box;  
197 - display: flex;  
198 - justify-content: space-between;  
199 - background-color: pink;  
200 - padding: 0 40rpx;  
201 -  
202 -  
203 - background-image: radial-gradient(circle at 8rpx 8rpx, transparent, red);  
204 - /* background-image:  
205 - radial-gradient(  
206 - circle at 0px 8px,  
207 - transparent 6px,  
208 - #ff9e6d 6px,  
209 - #ff9e6d 0px),  
210 - radial-gradient(  
211 - circle at 199px 8px,  
212 - transparent 6px,  
213 - #ff9e6d 6px,  
214 - #ff9e6d 0px); */  
215 - background-size: 30px 30px;  
216 - /* background-position: 0 0, 200px 0; */  
217 - /* background-repeat-y: no-repeat; */  
218 - background-repeat-x: no-repeat;  
219 -}  
220 -  
221 -.left {  
222 - width: 464rpx;  
223 - display: flex;  
224 - flex-direction: column;  
225 - justify-content: center;  
226 - color: white;  
227 -}  
228 -  
229 -.right {  
230 - width: calc(100% - 464rpx);  
231 - display: flex;  
232 - flex-direction: column;  
233 - justify-content: center;  
234 -}  
235 -  
236 -.coupon-container {  
237 - position: relative;  
238 - margin-bottom: 10rpx;  
239 - text-align: center;  
240 -}  
241 -  
242 -.info-container {  
243 - position: absolute;  
244 - top: 0;  
245 - left: 0;  
246 - width: 100%;  
247 - height: 100%;  
248 -  
249 -}  
250 -  
251 -.pdv20 {  
252 - padding-top: 20rpx;  
253 - padding-bottom: 20rpx;  
254 -}  
255 -  
256 -  
257 -  
258 -  
pages/user/grow_value/grow_value.js
@@ -182,7 +182,7 @@ Page({ @@ -182,7 +182,7 @@ Page({
182 var index=e.currentTarget.dataset.ind; 182 var index=e.currentTarget.dataset.ind;
183 switch (index) { 183 switch (index) {
184 case "0": getApp().goto("/pages/index/index/index");break; 184 case "0": getApp().goto("/pages/index/index/index");break;
185 - case "1": getApp().goto("/pages/user/coupons/coupons"); break; 185 + case "1": getApp().goto("/packageD/pages/user/coupons/coupons"); break;
186 case "2": getApp().goto("/pages/user/userqy/userqy"); break; 186 case "2": getApp().goto("/pages/user/userqy/userqy"); break;
187 } 187 }
188 }, 188 },
pages/user/integral/filter.wxs deleted
1 -var numFr = {  
2 - getNum: function(x) {  
3 - var f = parseInt(x);  
4 - return f;  
5 - },  
6 - getval: function(x,n) {  
7 - var f = parseFloat(x);  
8 - f=f.toFixed(n);  
9 - return f;  
10 - }  
11 -}  
12 -module.exports = {  
13 - getNum: numFr.getNum,  
14 - getval: numFr.getval,  
15 -}  
16 \ No newline at end of file 0 \ No newline at end of file
pages/user/integral/integral.js deleted
1 -// pages/yhq/yhq.js  
2 -var e = function (e) {  
3 - return e && e.__esModule ? e : {  
4 - default: e  
5 - };  
6 -}(require("../../../utils/LoadMore.js")), t = getApp(), a = t.request, o = t.globalData.setting, os = o,  
7 - i = require("../../../utils/util.js"), ut = i, b = require("../../../app.js"), app = b, s = require("../../../utils/common.js"), n = new e.default();  
8 -var regeneratorRuntime = require('../../../utils/runtime.js');  
9 -Page({  
10 -  
11 - /**  
12 - * 页面的初始数据  
13 - */  
14 - data: {  
15 - details: [], //数据  
16 - is_no_more:0,  
17 - current_page: 0,  
18 - showModal:false,//积分弹框的控制器  
19 - number:0,  
20 - jfmx:true,  
21 - jfcz:false,  
22 - val:1,  
23 - /**  
24 - * 页面配置  
25 - */  
26 - winWidth: 0,  
27 - winHeight: 0,  
28 - // tab切换  
29 - currentTab: 0,  
30 - money:1.00,  
31 - integral:50,  
32 - iurl: o.imghost,  
33 -  
34 - is_show_jfcz:0,  
35 - },  
36 - /**  
37 - * 刷出积分劵  
38 - */  
39 - async exchange() {  
40 - var e = this, result;  
41 - var user_id = getApp().globalData.user_id;  
42 - var store_id = os.stoid;  
43 - var get_data = {  
44 - user_id: user_id, store_id: store_id,  
45 - pageSize: 10, page: e.data.current_page  
46 - ///api/weshop/users/listExchangeCoupons  
47 - }; //api/index/yuck  
48 - await getApp().request.promiseGet("/api/weshop/users/listExchangeCoupons", {  
49 - data:get_data  
50 - }).then(res => {  
51 - var msg = res.data;  
52 - result = msg.data.pageData;  
53 - })  
54 - e.setData({  
55 - result: result  
56 - })  
57 -  
58 - },  
59 - /**  
60 - * 积分明细  
61 - */  
62 - async detaileds() {  
63 - if (this.data.is_no_more) return;  
64 - this.data.current_page++;  
65 - var e = this, details;  
66 - var user_id = getApp().globalData.user_id;  
67 - var store_id = os.stoid;  
68 - var get_data = {  
69 - user_id: user_id, store_id: store_id,  
70 - pageSize: 10, page: e.data.current_page  
71 - };  
72 - var big_arr = this.data.details;  
73 - await getApp().request.promiseGet("/api/weshop/users/listPoints", {  
74 - data: get_data  
75 - }).then(res => {  
76 -  
77 - var msg = res.data;  
78 - if(!msg || !msg.data.pageData || msg.data.pageData.length == 0){  
79 - this.data.is_no_more = 1;  
80 - getApp().showWarning("未找更多数据");  
81 - return false;  
82 - }  
83 -  
84 - details = msg.data.pageData;  
85 - details.forEach(function (val, ind) {  
86 - big_arr.push(val);  
87 - })  
88 - setTimeout(() => {  
89 - this.setData({  
90 - details: big_arr  
91 - });  
92 - }, 1500)  
93 - })  
94 - var get_datas= {  
95 - user_id: user_id, store_id: store_id,  
96 - };  
97 - await getApp().request.promiseGet("/api/weshop/users/getAllPoints", {  
98 - data: get_datas  
99 - }).then(res => {  
100 - var msg = res.data;  
101 - var integrals=msg.data.Integral;  
102 - console.log(integrals);  
103 - this.setData({number: integrals})  
104 - })  
105 -  
106 - },  
107 - //---加载更多是靠这个函数----  
108 - onReachBottom: function () {  
109 - console.log("加载跟多");  
110 - this.detaileds();  
111 -  
112 - },  
113 - //积分弹框控制器  
114 - integral:function(e){  
115 - var integral = e.target.dataset.integral;  
116 - var money = e.target.dataset.money;  
117 - console.log(money, "积分", integral);  
118 - this.setData({  
119 - showModal: true, money: money, integral: integral  
120 - })  
121 - },  
122 - //弹窗的方法  
123 - preventTouchMove: function () {  
124 -  
125 - },  
126 - // 票数量的加  
127 - plus:function(e){  
128 -  
129 - var val = this.data.val;  
130 - val++;  
131 - console.log("加",val);  
132 - this.setData({  
133 - val: val  
134 - })  
135 - },  
136 - //票数量的减  
137 - reduce:function(e){  
138 -  
139 - var val = this.data.val;  
140 - //console.log("减", val);  
141 - if (val>1){  
142 - val--;  
143 - //console.log("减", val);  
144 - this.setData({  
145 - val: val  
146 - })  
147 - }  
148 -  
149 - },  
150 - //关闭弹框  
151 - shut: function (e) {  
152 -  
153 - this.setData({ showModal: false })  
154 - console.log("bb");  
155 -  
156 - },  
157 - /**  
158 - * 点击tab切换  
159 - */  
160 - swichNav: function (e) {  
161 - console.log("是什么", e.target.dataset.current);  
162 - var val=e.target.dataset.current;  
163 -  
164 - var that = this;  
165 - if (this.data.currentTab== parseInt(e.target.dataset.current)) {  
166 - return false;  
167 - } else {  
168 - //如果是积分充值,但是不显示的话,不响应点击事件,退出  
169 - if(val!=0 && !this.data.is_show_jfcz){  
170 - return false;  
171 - }  
172 - that.setData({  
173 - currentTab: e.target.dataset.current  
174 - })  
175 - }  
176 -  
177 - if (val==0){  
178 - console.log("积分明细", e.target.dataset.current);  
179 - var jfmx=true;  
180 - var jfcz= false;  
181 - this.setData({ jfmx: jfmx, jfcz: jfcz, current_page: 0,details:[] });  
182 - this.detaileds();  
183 - }else{  
184 - if(this.data.is_show_jfcz) {  
185 - console.log("积分充值", e.target.dataset.current);  
186 - var jfmx = false;  
187 - var jfcz = true;  
188 - this.setData({jfmx: jfmx, jfcz: jfcz, current_page:1,result:[] });  
189 - this.exchange();  
190 - }else{  
191 - return false;  
192 - }  
193 - }  
194 -  
195 -  
196 - },  
197 - // 积分收支明细  
198 - detailed:function(){  
199 - wx:wx.navigateTo({  
200 - url: 'query/index',  
201 -  
202 - })  
203 - },  
204 - /**  
205 - * 生命周期函数--监听页面加载  
206 - */  
207 - onLoad: function (options) {  
208 -  
209 - var th=this;  
210 - getApp().request.get("/api/wx/weappSendlist/page", {  
211 - data: {  
212 - store_id: os.stoid,  
213 - typeid: "1002"  
214 - },  
215 - success: function(res) {  
216 - if (res.data.code == 0 && res.data.data.pageData.length > 0) {  
217 - var template_id = res.data.data.pageData[0].template_id;  
218 - th.setData({template_id:template_id});  
219 - }  
220 - }  
221 - });  
222 -  
223 -  
224 - },  
225 -  
226 - /**  
227 - * 生命周期函数--监听页面初次渲染完成  
228 - */  
229 - onReady: function () {  
230 -  
231 - },  
232 -  
233 - //点击确定  
234 - determine(event) {  
235 - console.log(event.currentTarget.dataset.money);  
236 - var money = event.currentTarget.dataset.money;  
237 - var integral = event.currentTarget.dataset.integral;  
238 - var val = event.currentTarget.dataset.val  
239 - //console.log(money, integral, val,"参数", a);  
240 - var user_id = getApp().globalData.user_id;  
241 - var store_id = os.stoid;  
242 - var th= this, number;  
243 -  
244 - this.sendsm(function(){  
245 - getApp().request.promiseGet("/api/weshop/users/getPay"  
246 - , {  
247 - data: { user_id: user_id, store_id: store_id, buynum: val, mon: money, integ: integral, recharge_type:1}  
248 - }).then(res => {  
249 - // console.log("1" + res);  
250 - var msg = res.data.data;  
251 - var parentSn = msg.order_sn;  
252 - var store_id = os.stoid;  
253 -  
254 - getApp().request.post("/api/weshop/order/pay/createRechargeOrder", {  
255 - data: {  
256 - parentSn: parentSn,  
257 - store_id: store_id  
258 - },  
259 - success: function (su) {  
260 - var n = su.data.data;  
261 - th.weixinPay(n,  
262 - function () {  
263 - console.log("支付成功页面2333");  
264 - th.jumpPaymentPage();  
265 - }, function () {  
266 - getApp().showWarning("支付失败");  
267 - })  
268 - }  
269 - })  
270 - })  
271 - })  
272 -  
273 -  
274 -  
275 - },  
276 - //------支付成功页面--------  
277 - jumpPaymentPage: function () {  
278 - console.log("支付成功页面2333");  
279 - wx.redirectTo({  
280 - url: "msg/msg"  
281 - });  
282 - },  
283 -  
284 - //------调起支付框--------  
285 - weixinPay: function (n, success, fail) {  
286 - if(!n) return false;  
287 - wx.requestPayment({  
288 - timeStamp: String(n.timeStamp),  
289 - nonceStr: n.nonceStr,  
290 - package: n.packageValue,  
291 - signType: n.signType,  
292 - paySign: n.paySign,  
293 - success: function (n) {  
294 - console.log(n), getApp().showSuccess("支付成功!");  
295 - "function" == typeof success && success();  
296 - // wx.redirectTo({  
297 - // url: "jf"  
298 - // });  
299 - },  
300 - fail: function (n) {  
301 - console.log(n), "requestPayment:fail" == n.errMsg ? getApp().showWarning("支付失败") : "requestPayment:fail cancel" == n.errMsg ? getApp().showWarning("您已取消支付") : getApp().showWarning("支付失败:" + n.errMsg.substr("requestPayment:fail ".length)),  
302 - "function" == typeof fail && fail();  
303 - }  
304 - });  
305 - },  
306 - /**  
307 - * 生命周期函数--监听页面显示  
308 - */  
309 - onShow: function () {  
310 - getApp().check_can_share();  
311 - //--先判断会员状态--  
312 - var user_info = getApp().globalData.userInfo;  
313 - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {  
314 - wx.navigateTo({ url: '/pages/togoin/togoin', })  
315 - return false;  
316 - }  
317 -  
318 - this.exchange();  
319 - this.detaileds();  
320 - wx.setNavigationBarTitle({  
321 - title: "我的积分",  
322 - })  
323 -  
324 - //要实时获取开关是显示  
325 - var th=this;  
326 - getApp().getConfig2(function(ee){  
327 - var json_d = JSON.parse(ee.switch_list);  
328 - th.setData({ is_show_jfcz: json_d.jfcz_switch });  
329 - },1)  
330 -  
331 - },  
332 -  
333 -  
334 -  
335 - /**  
336 - * 生命周期函数--监听页面隐藏  
337 - */  
338 - onHide: function () {  
339 -  
340 - },  
341 -  
342 -  
343 - /**  
344 - * 页面相关事件处理函数--监听用户下拉动作  
345 - */  
346 - onPullDownRefresh: function () {  
347 -  
348 - },  
349 -  
350 -  
351 - /**  
352 - * 用户点击右上角分享  
353 - */  
354 - onShareAppMessage: function () { getApp().globalData.no_clear=1  
355 -  
356 - },  
357 -  
358 - //订阅消息提醒  
359 - sendsm:function(func)  
360 - {  
361 - var template_id = this.data.template_id;  
362 - // //授权订阅  
363 - wx.requestSubscribeMessage({  
364 - tmplIds: [template_id],  
365 - success(res) {  
366 - func();  
367 - },  
368 - fail(res) {  
369 - func();  
370 - }  
371 - })  
372 -  
373 - },  
374 -})  
375 \ No newline at end of file 0 \ No newline at end of file
pages/user/integral/integral.json deleted
1 -{  
2 - "usingComponents": {}  
3 -}  
4 \ No newline at end of file 0 \ No newline at end of file
pages/user/integral/integral.wxml deleted
1 -<!--pages/yhq/yhq.wxml-->  
2 -<!-- 保留两位小数 过滤器-->  
3 -<wxs module="filter" src="filter.wxs"></wxs>  
4 -<view class='money'>  
5 - <view class='mt1'>账户积分 </view>  
6 - <view class='mt10'>  
7 - <text class='sz'>{{filter.getNum(number)}}</text>积分  
8 - </view>  
9 -</view>  
10 -  
11 -<!--选择款-->  
12 -<view class='top'>  
13 - <view class="jfmx-rim" bindtap="swichNav">  
14 - <!-- class='tyi' -->  
15 - <view class="swiper-tab-list {{currentTab==0 ? 'on' : ''}}" data-current="0" >积分明细</view></view>  
16 - <view class="jfmx-rim"bindtap="swichNav">  
17 - <!-- class='ter' -->  
18 - <view wx:if="{{is_show_jfcz}}" class="swiper-tab-list {{currentTab==1 ? 'on' : ''}}" data-current="1" >积分充值</view></view>  
19 -</view>  
20 -<view wx:if="{{jfmx}}">  
21 - <view class='body' bindtap="detailed">  
22 - <view class='b_left'>  
23 - <text>积分收支明细</text>  
24 - </view>  
25 - <view class='b_right'>  
26 - <view class='r_img'>  
27 - <text class='gd'>更多</text>  
28 - <image src='{{iurl}}miniapp/images/user/leftTip.png'></image>  
29 - </view>  
30 - </view>  
31 -  
32 - </view>  
33 - <view wx:if="{{details}}!=[]">  
34 - <block wx:for="{{details}}" wx:for-index="idx" wx:for-item="details">  
35 - <view class="data">  
36 - <view class="left">  
37 - <view class='left-test'>{{details.Remark}}  
38 - <view class='time'>{{details.BillDate}}</view>  
39 - </view>  
40 - </view>  
41 - <view class="val" style='color:{{(details.InOutInt>0)?"green":""}}'>  
42 - {{(details.InOutInt>0)?"+":""}}{{filter.getNum(details.InOutInt)}}积分 </view>  
43 - </view>  
44 - <view style="clear:both"></view>  
45 - </block>  
46 -  
47 - </view>  
48 -</view>  
49 -  
50 -<!-- 充值 -->  
51 -<view wx:if='{{jfcz}}'>  
52 - <block wx:for="{{result}}" wx:for-index="idx" wx:for-item="result">  
53 - <view class='jfcz1'>  
54 -  
55 - <view class="money-rim">  
56 - <view class="tosum">  
57 - <view class="rbm">¥</view>  
58 - <text class='f_big'>{{filter.getval(result.ToSum,2)}}</text>  
59 - </view>  
60 - </view>  
61 - <view class='mb20'>充值{{result.Integral}}积分</view>  
62 - <view class='jf_btn' data-money='{{result.ToSum}}' data-integral='{{result.Integral}}' bindtap="integral">立即充值</view>  
63 - </view>  
64 - </block>  
65 -  
66 -  
67 - <!-- 积分劵的弹框 -->  
68 - <view class="mask" catchtouchmove="preventTouchMove" wx:if="{{showModal}}"></view>  
69 - <view class="big-rim modalDlg" wx:if="{{showModal}}">  
70 - <view class="gb-rim" bindtap="shut">  
71 - <image class="imag" src="{{iurl}}/miniapp/images/usermoney/img.png"></image>  
72 - </view>  
73 - <view class='cz-rim'>  
74 - <view class="text">充值{{integral}}积分</view>  
75 - <view class="min-rim">  
76 - <view class="fh">¥</view>  
77 - <view class="value">{{filter.getval(money,2)}}</view>  
78 - </view>  
79 - </view>  
80 - <view class="bk">  
81 - <view class="shul-rim">  
82 - <view class="gmsl">购买数量</view>  
83 - <view class="reduce" bindtap='reduce'>  
84 - <!-- style='background: url(/images/usermoney/shop-cart.png)no-repeat 10rpx -130rpx;background-size:140rpx; ' -->  
85 - <image class="jian" src="{{iurl}}/miniapp/images/usermoney/shop-cart.png"></image>  
86 - </view>  
87 -  
88 - <view class='input_box'>  
89 - <input class="box" value='{{val}}'>{{val}}</input>  
90 - </view>  
91 - <view class="reduce_two" bindtap='plus'>  
92 - <image class="jia" src="{{iurl}}/miniapp/images/usermoney/shop-cart.png"></image>  
93 - </view>  
94 - </view>  
95 - <button class="button" data-money='{{money}}' data-integral='{{integral}}' data-val="{{val}}" bindtap="determine">确定</button>  
96 - </view>  
97 - </view>  
98 -</view>  
99 \ No newline at end of file 0 \ No newline at end of file
pages/user/integral/integral.wxss deleted
1 -/* pages/yhq/yhq.wxss */  
2 -  
3 -.money {  
4 - background-image: url(https://mshopimg.yolipai.net/miniapp/images/user/redbg.jpg);  
5 - color: #fff;  
6 - padding: 40rpx;  
7 - font-size: 28rpx;  
8 - text-align: left;  
9 -}  
10 -  
11 -.mt1 {  
12 - width: 80%;  
13 -}  
14 -  
15 -.mt10 {  
16 - margin-top: 20rpx !important;  
17 - width: 80%;  
18 -}  
19 -  
20 -  
21 -  
22 -.top {  
23 - display: flex;  
24 - flex-direction: row;  
25 - width: 100%;  
26 - min-height: 70rpx;  
27 - color: #000;  
28 - line-height: 70rpx;  
29 - text-align: center;  
30 - font-size: 28rpx;  
31 - border-bottom: 20rpx solid #eee;  
32 -}  
33 -  
34 -.tyi {  
35 - background-color: bisque;  
36 - flex: 1;  
37 - min-height: 90rpx;  
38 - color: #000;  
39 - line-height: 90rpx;  
40 - text-align: center;  
41 -}  
42 -  
43 -.ter {  
44 - background-color: white;  
45 - flex: 1;  
46 - min-height: 90rpx;  
47 - color: #000;  
48 - line-height: 90rpx;  
49 -}  
50 -  
51 -.tsan {  
52 - background-color: blue;  
53 - flex: 1;  
54 - min-height: 90rpx;  
55 - color: #000;  
56 - line-height: 90rpx;  
57 -}  
58 -  
59 -.tsan {  
60 - background-color: brown;  
61 - flex: 1;  
62 - min-height: 90rpx;  
63 - color: #000;  
64 - line-height: 90rpx;  
65 -}  
66 -  
67 -.tsi {  
68 - background-color: yellowgreen;  
69 - flex: 1;  
70 - min-height: 90rpx;  
71 - color: #000;  
72 - line-height: 90rpx;  
73 -}  
74 -  
75 -.swiper-tab {  
76 - width: 100%;  
77 - border-bottom: 2rpx solid #777;  
78 - text-align: center;  
79 - line-height: 80rpx;  
80 -}  
81 -  
82 -.swiper-tab-list {  
83 - font-size: 30rpx;  
84 - display: inline-block;  
85 - width: 100%;  
86 - color: #777;  
87 -}  
88 -.jfmx-rim{  
89 - width: 50%;  
90 - height: auto;  
91 - text-align: center;  
92 - border-right:3rpx solid #eeeeee;  
93 -}  
94 -.on {  
95 -  
96 - border-bottom: 5rpx solid red;  
97 - width: 90%;  
98 -  
99 -}  
100 -  
101 -.swiper-box {  
102 - display: block;  
103 - height: 100%;  
104 - width: 100%;  
105 - overflow: hidden;  
106 -}  
107 -  
108 -.swiper-box view {  
109 - text-align: center;  
110 -}  
111 -  
112 -.body {  
113 - padding: 20rpx;  
114 - display: flex;  
115 - border-bottom: 2rpx solid #eee;  
116 -}  
117 -  
118 -.b_left {  
119 - width: 60%;  
120 - overflow: hidden;  
121 - text-overflow: ellipsis;  
122 - white-space: nowrap;  
123 - font-size: 28rpx;  
124 - color: #000;  
125 -}  
126 -  
127 -.b_right {  
128 - width: 40%;  
129 - text-align: right;  
130 - font-size: 28rpx;  
131 -}  
132 -  
133 -.r_img image {  
134 - width: 12rpx;  
135 - height: 24rpx;  
136 - margin-left: 20rpx !important;  
137 -}  
138 -  
139 -.cen {  
140 - display: flex;  
141 - padding: 10rpx 20rpx;  
142 -}  
143 -  
144 -.c_left {  
145 - font-size: 28rpx;  
146 - color: #000;  
147 - width: 60%;  
148 - overflow: hidden;  
149 - text-overflow: ellipsis;  
150 - white-space: nowrap;  
151 - text-align: left;  
152 -}  
153 -  
154 -/* .c_left_top{  
155 -  
156 -} */  
157 -  
158 -.c_left_bottom {  
159 - color: #999;  
160 - font-size: 24rpx;  
161 - line-height: 30rpx;  
162 - margin-top: 20rpx;  
163 -}  
164 -  
165 -.c_right {  
166 - color: green;  
167 - margin-top: 10px;  
168 - width: 40%;  
169 - text-align: right;  
170 -}  
171 -  
172 -/* 充值【】 */  
173 -  
174 -.jfcz1 {  
175 - background: url(https://mshopimg.yolipai.net/miniapp/images/user/jfzyc1.png);  
176 - text-align: center;  
177 - padding: 20px 0;  
178 - font-size: 18px;  
179 - color: #fff;  
180 - margin: 20px 2% 0 0;  
181 - width: 90%;  
182 - background-size:720rpx;  
183 - vertical-align: top;  
184 - display: inline-block;  
185 - margin-left: 30rpx;  
186 -}  
187 -.jian{  
188 - width:189rpx;  
189 -height:268rpx;  
190 -margin-top:-122rpx;  
191 -margin-left:5rpx;  
192 -}  
193 -.jia{  
194 -width:204rpx;  
195 -height:266rpx;  
196 -margin-top:-119rpx;  
197 -margin-left:-98rpx;  
198 -  
199 -}  
200 -.f_big  
201 - {  
202 - margin-top: 15rpx;  
203 - width:125rpx;  
204 - height: 65rpx;  
205 - font-size: 60rpx;  
206 - font-family: 'SimHei',Arial;  
207 -}  
208 -.money-rim{  
209 - display: flex;  
210 -}  
211 -.rbm{  
212 - width: 35rpx;  
213 - margin-left:250rpx;  
214 - padding-top: 30rpx;  
215 - height: auto;  
216 -}  
217 -.tosum{  
218 - text-align: center;  
219 - display: flex;  
220 - width: 100%;  
221 - height: auto;  
222 -}  
223 -  
224 -.mb20 {  
225 - margin-bottom: 20px;  
226 - font-size:33rpx;  
227 -  
228 -}  
229 -  
230 -.jf_btn {  
231 - background-color: #c4182e;  
232 - display: inline-block;  
233 - height: 50px;  
234 - line-height: 50px;  
235 - width: 80%;  
236 - margin: auto;  
237 - border-radius: 4px;  
238 - text-align: center;  
239 -}  
240 -  
241 -/* 弹出框的大边框 */  
242 -  
243 -.big-rim {  
244 - width: 100%;  
245 - height: 440rpx;  
246 -}  
247 -  
248 -/* 关闭的边框 */  
249 -  
250 -.gb-rim {  
251 - padding-top: 30rpx;  
252 - width: 65rpx;  
253 - height: 65rpx;  
254 - margin-left: 675rpx;  
255 -}  
256 -  
257 -/* 关闭的图片 */  
258 -  
259 -.imag {  
260 - width: 60rpx;  
261 - height: 60rpx;  
262 -}  
263 -  
264 -/* 购买数量边框 */  
265 -  
266 -.shul-rim {  
267 - display: flex;  
268 - width: 100%;  
269 - height: 110rpx;  
270 - border-top: 3rpx solid #e8e8e8;  
271 -}  
272 -  
273 -/* 购买数量 */  
274 -  
275 -.gmsl {  
276 - font-style: normal;  
277 - width: 350rpx;  
278 - height: 110rpx;  
279 - font-size: 25rpx;  
280 - padding-top: 25rpx;  
281 - padding-left: 30rpx;  
282 - line-height:110rpx;  
283 -  
284 -}  
285 -  
286 -/* 减的边框 */  
287 -  
288 -.reduce {  
289 - margin: 40rpx 10rpx;  
290 - width: 60rpx;  
291 - height: 60rpx;  
292 - background-size:20px;  
293 - background-color: #000;  
294 - overflow: hidden;  
295 - border-radius: 8rpx;  
296 - margin-left:40rpx;  
297 -  
298 -}  
299 -  
300 -/* 减的边框 */  
301 -  
302 -.reduce_two {  
303 - margin: 36rpx 10rpx;  
304 - width:60rpx;  
305 - height: 60rpx;  
306 - background-size:20px;  
307 - background-color: #000;  
308 - overflow: hidden;  
309 - border-radius: 8rpx;  
310 -}  
311 -  
312 -/* 圆里的值 */  
313 -  
314 -.zhi {  
315 - height: 55rpx;  
316 - line-height: 55rpx;  
317 - display: block;  
318 - color: #7f7e88;  
319 - text-align: center;  
320 -}  
321 -  
322 -/* 充1000送100的边框 */  
323 -  
324 -.bk {  
325 - margin-left: 20rpx;  
326 - height: 108;  
327 - width: 100%;  
328 -}  
329 -  
330 -/* 充1000送100 */  
331 -  
332 -.text {  
333 - width: 300rpx;  
334 - font-size: 40rpx;  
335 - font-family: 'SimHei', Arial;  
336 -  
337 -}  
338 -/* 充值边框头部 */  
339 -.cz-rim{  
340 - width: 70%;  
341 - height: 115rpx;  
342 - margin-bottom: 30rpx;  
343 - margin-left:44rpx;  
344 - margin-top:-40rpx;  
345 -  
346 -}  
347 -  
348 -/* ¥ */  
349 -  
350 -.fh {  
351 - display: inline-block;  
352 - width: 26rpx;  
353 - height: 35rpx;  
354 - font-size: 30rpx;  
355 - color: red;  
356 -  
357 -}  
358 -  
359 -/* 100 */  
360 -  
361 -.value {  
362 - color: red;  
363 - display: inline-block;  
364 - width: 90rpx;  
365 - height: 45rpx;  
366 - font-size: 40rpx;  
367 - font-family: 'SimHei', Arial;  
368 -}  
369 -  
370 -/* 买多少张票的输入框 */  
371 -  
372 -.input_box {  
373 - width: 120rpx;  
374 - height:80rpx;  
375 - margin:25rpx 0rpx;  
376 - border:2rpx solid #DADADA;  
377 -}  
378 -.box{  
379 - width:80rpx;  
380 - height:60rpx;  
381 - text-align: center;  
382 - vertical-align: middle;  
383 - margin:10rpx 23rpx;  
384 -  
385 -}  
386 -  
387 -/* 按钮 */  
388 -  
389 -.button {  
390 - width: 90%;  
391 - height: 85rpx;  
392 - margin-left: 20rpx;  
393 - margin-top: 30rpx;  
394 - font-size: 25rpx;  
395 - color: #fff;  
396 - background-color: #c4182e;  
397 - font-family: 'SimHei', Arial;  
398 - text-align: center;  
399 -line-height:85rpx;  
400 -  
401 -}  
402 -  
403 -.mask {  
404 - width: 100%;  
405 - height: 100%;  
406 - position: fixed;  
407 - top: 0;  
408 - left: 0;  
409 - background: #000;  
410 - z-index: 9000;  
411 - opacity: 0.1;  
412 -}  
413 -  
414 -.modalDlg {  
415 - position: fixed;  
416 - z-index: 9999;  
417 - background-color: #fff;  
418 - border-radius: 10rpx;  
419 - flex-direction: column;  
420 - align-items: center;  
421 - bottom: 0;  
422 - left: 0;  
423 -}  
424 -  
425 -/*数据列表边框*/  
426 -.data{  
427 - display: flex;  
428 - width: 100%;  
429 - border-bottom: 1px solid #E8E8E8;  
430 - height: 90rpx;  
431 -}  
432 -/*左边的数据 */  
433 -.left{  
434 - width:70%;  
435 - height: 120rpx;  
436 -  
437 -}  
438 -/* 单据单号 */  
439 -.left-test{  
440 - margin-left: 30rpx;  
441 - padding-top: 10rpx;  
442 - font-size: 25rpx;  
443 - color: #000000;  
444 - width: 100%;  
445 -}  
446 -/* 单据时间 */  
447 -.time{  
448 -  
449 - font-size: 25rpx;  
450 - color: #999999;  
451 - width: 100%;  
452 -}  
453 -/* 流动积分的加减 */  
454 -.val{  
455 - padding-top:20rpx;  
456 - padding-right:20rpx;  
457 - height: 70rpx;  
458 - width: 175rpx;  
459 - font-size: 27rpx;  
460 - font-family: 'SimHei',Arial;  
461 - text-align:right;  
462 - float: right  
463 -  
464 -}  
465 -/* .更多 */  
466 -.gd{  
467 - color: #999999;  
468 - font-size: 25rpx;  
469 -}  
470 \ No newline at end of file 0 \ No newline at end of file
pages/user/integral/msg/msg.js deleted
1 -// pages/user/member/bring/msg/msg.js  
2 -var t = getApp(),o = t.globalData.setting,os = o;  
3 -Page({  
4 -  
5 - /**  
6 - * 页面的初始数据  
7 - */  
8 - data: {  
9 - // timer: '',//定时器名字  
10 - // countDownNum: '3'//倒计时初始值  
11 - iurl: o.imghost,  
12 - },  
13 -  
14 -  
15 - /**  
16 - * 生命周期函数--监听页面加载  
17 - */  
18 - onLoad: function (options) {  
19 -  
20 - },  
21 -  
22 - /**  
23 - * 生命周期函数--监听页面初次渲染完成  
24 - */  
25 - onReady: function () {  
26 -  
27 - },  
28 -  
29 - /**  
30 - * 生命周期函数--监听页面显示  
31 - */  
32 - onShow: function () {  
33 - getApp().check_can_share();  
34 -  
35 - wx.setNavigationBarTitle({  
36 - title: "支付成功",  
37 - })  
38 - },  
39 - // countDown: function () {  
40 - // let that = this;  
41 - // let countDownNum = that.data.countDownNum;//获取倒计时初始值  
42 - // //如果将定时器设置在外面,那么用户就看不到countDownNum的数值动态变化,所以要把定时器存进data里面  
43 - // that.setData({  
44 - // timer: setInterval(function () {//这里把setInterval赋值给变量名为timer的变量  
45 - // //每隔一秒countDownNum就减一,实现同步  
46 - // countDownNum--;  
47 - // //然后把countDownNum存进data,好让用户知道时间在倒计着  
48 - // that.setData({  
49 - // countDownNum: countDownNum  
50 - // })  
51 - // //在倒计时还未到0时,这中间可以做其他的事情,按项目需求来  
52 - // if (countDownNum == 0) {  
53 - // //这里特别要注意,计时器是始终一直在走的,如果你的时间为0,那么就要关掉定时器!不然相当耗性能  
54 - // //因为timer是存在data里面的,所以在关掉时,也要在data里取出后再关闭  
55 - // clearInterval(that.data.timer);  
56 - // //关闭定时器之后,可作其他处理codes go here  
57 - // //--跳到绑定页面--  
58 - // wx.navigateTo({  
59 - // url: '../../../integral/jf',  
60 - // })  
61 - // }  
62 - // }, 500)  
63 - // })  
64 -  
65 - click:function(){  
66 - wx.redirectTo({  
67 - url: '../integral',  
68 - })  
69 - },  
70 - homepage:function(){  
71 -  
72 - wx.navigateTo({  
73 - url: "../../index/index",  
74 - })  
75 - },  
76 -  
77 - /**  
78 - * 生命周期函数--监听页面隐藏  
79 - */  
80 - onHide: function () {  
81 -  
82 - },  
83 -  
84 - /**  
85 - * 生命周期函数--监听页面卸载  
86 - */  
87 - onUnload: function () {  
88 -  
89 - },  
90 -  
91 - /**  
92 - * 页面相关事件处理函数--监听用户下拉动作  
93 - */  
94 - onPullDownRefresh: function () {  
95 -  
96 - },  
97 -  
98 - /**  
99 - * 页面上拉触底事件的处理函数  
100 - */  
101 - onReachBottom: function () {  
102 -  
103 - },  
104 -  
105 - /**  
106 - * 用户点击右上角分享  
107 - */  
108 - onShareAppMessage: function () { getApp().globalData.no_clear=1  
109 -  
110 - }  
111 -})  
112 \ No newline at end of file 0 \ No newline at end of file
pages/user/integral/msg/msg.json deleted
1 -{  
2 - "usingComponents": {}  
3 -}  
4 \ No newline at end of file 0 \ No newline at end of file
pages/user/integral/msg/msg.wxml deleted
1 -<view class="rim">  
2 -  
3 -<view class="img"><image class="imgs"src="{{iurl}}/miniapp/images/usermoney/dd.png"></image></view>  
4 -<view class="zhon">  
5 -<view class="czcg">充值成功 </view>  
6 -<view class="itme">及时跟进订单信息哟!</view>  
7 -</view>  
8 -<view class="click">  
9 -<view class="top" bindtap='click'>继续购物</view>  
10 -<view class="hom-page"bindtap='homepage'>返回首页</view>  
11 -</view>  
12 -</view>  
pages/user/integral/msg/msg.wxss deleted
1 -/* 边框 */  
2 -.rim{  
3 - width: 100%;  
4 - height: auto;  
5 - text-align: center;  
6 -  
7 -}  
8 -  
9 -.imgs{  
10 - width:100rpx;  
11 - height:100rpx;  
12 - margin-top:20rpx;  
13 - margin-left:122rpx;  
14 -  
15 -}  
16 -/* 图片 */  
17 -.img{  
18 - width:110rpx;  
19 - height:110rpx;  
20 - margin: 40rpx 200rpx;  
21 - margin-right:60rpx;  
22 -  
23 -}  
24 -.zhon{  
25 - width: 100%;  
26 - height: 168rpx;  
27 - margin-top:-20rpx;  
28 -  
29 -}  
30 -.czcg{  
31 - width: 250rpx;  
32 - height: 135rpx;  
33 - color: #c4182e;  
34 - font-size: 50rpx;  
35 - font-family: 'SimHei',Arial;  
36 - margin-left:243rpx;  
37 - padding-top:20px;  
38 -  
39 -  
40 -}  
41 -/* 倒计时 */  
42 -.itme{  
43 - margin-top: -40rpx;  
44 -  
45 - width: 100%;  
46 - height: 50rpx;  
47 - color: #999;  
48 - font-family: 'SimHei',Arial;  
49 - font-size: 35rpx;  
50 -}  
51 -/* 按钮的边框 */  
52 -.click{  
53 - display: flex;  
54 - width: 100%;  
55 - height: 80rpx;  
56 -}  
57 -/* 返回上一页 */  
58 -.top{  
59 - margin-top: 30rpx;  
60 - background: #c4182e;  
61 - color: #fff;  
62 - text-align: center;  
63 - width: 45%;  
64 - height: 75rpx;  
65 - line-height: 75rpx;  
66 - border-radius:5px;  
67 - margin-left: 20rpx;  
68 - font-size: 32rpx;  
69 -}  
70 -.hom-page{  
71 - margin-top: 30rpx;  
72 - font-size: 32rpx;  
73 - background: #c4182e;  
74 - color: #fff;  
75 - text-align: center;  
76 - width: 45%;  
77 - height:75rpx;  
78 - line-height: 75rpx;  
79 - border-radius:5px;  
80 - margin-left: 40rpx;  
81 -}  
82 -  
pages/user/integral/query/index.js deleted
1 -var t = getApp(),  
2 - a = t.request,  
3 - o = t.globalData.setting,  
4 - os = o,  
5 - i = require("../../../../utils/util.js"),  
6 - ut = i,  
7 - s = require("../../../../utils/common.js");  
8 -var regeneratorRuntime = require('../../../../utils/runtime.js');  
9 -Page({  
10 - data: {  
11 -  
12 - val: false,  
13 - color: "",  
14 - details: [], //数据  
15 - isBind: true, //控制清空时间日期的按钮  
16 - isBinds: true,  
17 - select: false, //下拉框控制器  
18 - grade_name: '全部', //下拉框参数  
19 - grades: [  
20 - "全部",  
21 - '支出',  
22 - '收入',  
23 - ],  
24 - datet: "",  
25 - dates: "",  
26 - result: [],  
27 - money: 0,  
28 - oddNumbers: "",  
29 - pageSize: 10,  
30 - page: 1,  
31 - current_page: 0,  
32 - //is_no_more: 0,  
33 - },  
34 -  
35 -  
36 - /**  
37 - * 生命周期函数--监听页面显示  
38 - */  
39 - onShow: function (options) {  
40 - wx.setNavigationBarTitle({  
41 - title: "积分明细",  
42 - })  
43 - this.init();  
44 - },  
45 - //监听输入框显示清空按钮  
46 - watchPassWord: function(event) {  
47 - console.log("监听输入框显示清空按钮");  
48 - var val = event.detail.value;  
49 - console.log("是什么", val);  
50 - if (val != "" && val != null) {  
51 - var isBind = false;  
52 - this.setData({  
53 - isBind: isBind  
54 - });  
55 -  
56 - }  
57 - },  
58 - /**  
59 - * 点击下拉框  
60 - */  
61 - bindShowMsg() {  
62 - console.log(!this.data.select);  
63 - this.setData({  
64 - select: !this.data.select  
65 - })  
66 - },  
67 - /**  
68 - * 已选下拉框  
69 - */  
70 - mySelect(e) {  
71 - console.log(e)  
72 - var name = e.currentTarget.dataset.name  
73 - this.setData({  
74 - grade_name: name,  
75 - select: false  
76 - })  
77 - },  
78 - /**  
79 - * 生命周期函数--监听页面加载  
80 - */  
81 - onLoad: function(options) {  
82 -  
83 - },  
84 - //明细查询  
85 - Gettime: function (e) {  
86 - var page = 0;  
87 - //开始获取时间  
88 - var th = this;  
89 - var datet= th.data.datet;  
90 - var dates= th.data.dates;  
91 - console.log(datet, "开始结束", dates);  
92 - //删除字符中的——  
93 - var datatk = datet.replace(/[-]/g, "");  
94 - //转换类型  
95 - var datak = parseInt(datatk);  
96 - //删除字符中的——  
97 - var dataj = dates.replace(/[-]/g, "");  
98 - //转换类型  
99 - var dataj = parseInt(dataj);  
100 -  
101 - // if (typeof(BeginDate)!="undefined"){  
102 - // //删除字符中的——  
103 - // var datatk = BeginDate.replace(/[-]/g, "");  
104 - // //转换类型  
105 - // datak = parseInt(datatk);  
106 - // console.log(typeof datak, "开始数据类型", datak)  
107 - // }  
108 -  
109 - // if (typeof(EndDate)!="undefined") {  
110 - // //删除字符中的——  
111 - // var dataj = EndDate.replace(/[-]/g, "");  
112 - // //转换类型  
113 - // dataj = parseInt(dataj);  
114 - // console.log(typeof dataj, "结束据类型", dataj)  
115 - // }  
116 - console.log("开始", datak, "结束", dataj);  
117 - //判断初始时间小于结束时间  
118 - if (datak > dataj) {  
119 - console.log("开始时间", datak, '结束时间', dataj, "时间判断");  
120 - getApp().showWarning("结束时间错误");  
121 - this.setData({ details: [] });  
122 - } else {  
123 - this.setData({ details: [] });  
124 - console.log(datak, dataj, "时间判断2");  
125 - console.log("有进来吗", datet, dates);  
126 - this.setData({ current_page: 0 });  
127 - this.init();  
128 - }  
129 -  
130 - },  
131 -  
132 - async init() {  
133 - // if (this.data.is_no_more) return;  
134 - this.data.current_page++;  
135 - var BeginDate = this.data.datet;  
136 - var EndDate = this.data.dates;  
137 - var user_id = getApp().globalData.user_id;  
138 - var store_id = os.stoid;  
139 - var tpye = this.data.grade_name;  
140 - console.log("是是啊", tpye);  
141 - var e = this,  
142 - details = "";  
143 - var get_data = {  
144 - user_id: user_id, store_id: store_id,  
145 - pageSize: 10, page: e.data.current_page  
146 - };  
147 - // 判断下拉框,添加类型  
148 - if (tpye == "全部") {  
149 - console.log("全部", tpye);  
150 - get_data.FInregral = null;  
151 - } else if (tpye == "支出") {  
152 - console.log("支出");  
153 - get_data.FInregral = 0;  
154 - } else {  
155 - console.log("收入");  
156 - get_data.FInregral = 1;  
157 - }  
158 - if (EndDate != "" && EndDate != null) {  
159 - get_data.EndDate = EndDate;  
160 - }  
161 -  
162 - if (BeginDate != "" && BeginDate!= null) {  
163 - get_data.BeginDate = BeginDate;  
164 - }  
165 - var big_arr = this.data.details;  
166 - await getApp().request.promiseGet("/api/weshop/users/listPoints", {  
167 - data: get_data, isShowLoading: 1  
168 - }).then(res => {  
169 -  
170 - var details = res.data;  
171 -  
172 -  
173 -  
174 -  
175 - if (!details.data || details.data.pageData.length == 0) {  
176 - // this.data.is_no_more = 1;  
177 - getApp().showWarning("未找更多数据");  
178 - return false;  
179 - }  
180 -  
181 - var details = details.data.pageData;  
182 -  
183 -  
184 - details.forEach(function (val, ind) {  
185 - big_arr.push(val);  
186 - })  
187 - setTimeout(() => {  
188 - this.setData({  
189 - details: big_arr  
190 - });  
191 - }, 1500)  
192 -  
193 -  
194 - })  
195 - },  
196 - //---加载更多是靠这个函数----  
197 - // onReachBottom: function () {  
198 - // console.log("加载");  
199 - // this.init();  
200 -  
201 - // },  
202 -  
203 - //起始时间  
204 - bindDateChenge: function(e) {  
205 - console.log("是什么", e.detail.value);  
206 - var isBind = false;  
207 - this.setData({  
208 - datet: e.detail.value,  
209 - isBind: isBind  
210 - });  
211 - },  
212 - // 结束时间  
213 - bindDateChenges: function(e) {  
214 - console.log("是什么", e.detail.value);  
215 - var isBinds = false;  
216 - this.setData({  
217 - dates: e.detail.value,  
218 - isBinds: isBinds  
219 - });  
220 - },  
221 - //catchtap阻止冒泡,点击清除开始时间的按钮  
222 - eliminate: function() {  
223 - console.log("试试");  
224 - var isBind = true;  
225 - var data = "";  
226 - this.setData({  
227 - datet: data,  
228 - isBind: isBind  
229 - })  
230 - },  
231 - //catchtap阻止冒泡,点击清除结束时间的按钮  
232 - eliminates: function() {  
233 - console.log("试试");  
234 - var isBinds = true;  
235 - var dates = "";  
236 - this.setData({  
237 - dates: dates,  
238 - isBinds: isBinds  
239 - })  
240 - }  
241 -  
242 -})  
243 \ No newline at end of file 0 \ No newline at end of file
pages/user/integral/query/index.json deleted
1 -{}  
2 \ No newline at end of file 0 \ No newline at end of file
pages/user/integral/query/index.wxml deleted
1 -<wxs module="filter" src="../filter.wxs"></wxs>  
2 -  
3 -<view class="big-rim">  
4 - <form bindsubmit='Gettime'>  
5 - <view class="min-rim">  
6 - <view class="rq">日期:</view>  
7 -  
8 - <picker class='pi' mode="date" value='{{datet}}' start="2019/1/1" bindchange='bindDateChenge'>  
9 - <view class="rq-rim">  
10 - <view class='kssj'><text class="wz"name="datat"value='{{datet}}'bindinput='watchPassWord'>{{datet}}</text></view>  
11 - <!-- 清除输入框中的内容-->  
12 - <view hidden='{{isBind}}' class="qc-rim">  
13 - <button class="empty" catchtap="eliminate">x</button>  
14 - </view>  
15 - </view>  
16 - </picker>  
17 -  
18 - <view class="zi">至 </view>  
19 - <picker class="pis"mode="date" value='{{dates}}' start="2019/1/1" end="" bindchange='bindDateChenges'>  
20 - <view class="kssj">  
21 - <text class='wz' name="datas" value='{{dates}}'>{{dates}}</text>  
22 - </view>  
23 - <!-- 清除输入框中的内容 -->  
24 - <view class="end-rim" hidden="{{isBinds}}">  
25 - <button class="end" catchtap="eliminates">x</button>  
26 - </view>  
27 - </picker>  
28 - </view>  
29 - <view class="xknr-rim">  
30 - <view class="cxnr">查询内容 </view>  
31 - <view class='top'>  
32 - <!-- 下拉框 -->  
33 - <view class='top-selected' bindtap='bindShowMsg'>  
34 - <input name="grade_name" class="texts" value='{{grade_name}}'>{{grade_name}}</input>  
35 - <view class="rim-images">  
36 - <image class="images" src='{{iurl}}/miniapp/images/usermoney/ico-pt4.png'></image>  
37 - </view>  
38 - </view>  
39 - <!-- 下拉需要显示的列表 -->  
40 - <view class="select-box" wx:if="{{select}}">  
41 - <view wx:for="{{grades}}" wx:key="unique">  
42 - <view class="select_one" bindtap="mySelect" data-name="{{item}}">{{item}}</view>  
43 - </view>  
44 - </view>  
45 - </view>  
46 - </view>  
47 - <button class="botton" form-type='submit' data-query='{{item}}'>查询明细</button>  
48 - </form>  
49 - <view class="zs">注:读取时段内近10笔记录</view>  
50 -</view>  
51 -  
52 -<view class="db">  
53 - <view class="xm">项目</view>  
54 - <view class="je">积分</view>  
55 -</view>  
56 -  
57 -  
58 -<view wx:if="{{details.length!=0}}">  
59 - <block wx:for="{{details}}" wx:for-index="idx" wx:for-item="details">  
60 - <view class="data">  
61 - <view class="left">  
62 - <view class='left-test'>{{details.Remark}}  
63 - <view class='time'>{{details.BillDate}}</view>  
64 - </view>  
65 - </view>  
66 - <view class="val" style='color:{{(details.InOutInt>0)?"green":""}}'>  
67 - {{(details.InOutInt>0)?"+":""}}{{filter.getNum(details.InOutInt)}}积分 </view>  
68 - </view>  
69 - </block>  
70 -  
71 -</view>  
72 \ No newline at end of file 0 \ No newline at end of file
pages/user/integral/query/index.wxss deleted
1 -/* 大边框 */  
2 -.big-rim{  
3 - margin-top: 15rpx;  
4 - width: 100%;  
5 - height: 345rpx;  
6 - border-bottom: 8px solid #EEEEEE;  
7 -}  
8 -/* 单据时间 */  
9 -.time{  
10 -  
11 - font-size: 25rpx;  
12 - color: #999999;  
13 - width: 100%;  
14 -}  
15 -.min-rim{  
16 -display: flex;  
17 -width: 100%;  
18 -height: auto;  
19 -margin-left: 30rpx;  
20 -}  
21 -/* 日期 */  
22 -.rq{  
23 - height: 25rpx;  
24 - font-size: 28rpx;  
25 - margin-top:12rpx;  
26 - font-family:'SimHei',Arial;  
27 -}  
28 -/* 日期控件 */  
29 -.pi{  
30 - width:200rpx;  
31 - height:auto;  
32 - margin-left:10rpx;  
33 -  
34 -}  
35 -.pis{  
36 - width:200rpx;  
37 - height:auto;  
38 - margin-left:30rpx;  
39 -}  
40 -/* 日期边框 */  
41 -.rq-rim{  
42 -position:relative;  
43 -left:0;  
44 -top:0  
45 -}  
46 -/* 开始时间边框*/  
47 -.kssj{  
48 -display: inline-block;  
49 -height: 50rpx;  
50 -background-color: #EEEEEE;  
51 -border: 1px solid #DADADA;  
52 -width:200rpx;  
53 -border-radius: 3px;  
54 -line-height:40rpx;  
55 -position:relative;  
56 -top:0rpx;  
57 -left:0rpx;  
58 -  
59 -}  
60 -/* 开始时间的文字 */  
61 -.wz{  
62 - display: inline-block;  
63 -font-size: 25rpx;  
64 -color: #333;  
65 -}  
66 -/* 开始清空按钮的 边框*/  
67 -.qc-rim{  
68 - position:absolute;  
69 - top:10rpx;  
70 - left:173rpx;  
71 -  
72 -}  
73 -/* 结束时间清空输入框的按钮的边框 */  
74 -.end-rim{  
75 -position: absolute;  
76 - top: 23rpx;  
77 - left:547rpx;  
78 - width: 25rpx;  
79 - height: 25rpx;  
80 -}  
81 -/* 查询内容 */  
82 -.cxnr{  
83 - margin-left:30rpx;  
84 - font-size:28rpx;  
85 - font-family: 'SimHei',Arial;  
86 -}  
87 -/* 至 */  
88 -.zi{  
89 - margin-top:14rpx;  
90 - font-weight:600;  
91 - font-size:28rpx;  
92 - font-family: 'SimHei',Arial;  
93 - margin-left:30rpx;  
94 -}  
95 -/* 结束时间 */  
96 -  
97 -.jssj{  
98 - padding-left: 10rpx;  
99 - margin-left: 30rpx;  
100 -padding-bottom: 10rpx;  
101 -height: 35rpx;  
102 -font-size: 25rpx;  
103 -color: #333;  
104 -background-color: #EEEEEE;  
105 -border: 1px solid #DADADA;  
106 -width:85%;  
107 -border-radius: 5px;  
108 -  
109 -}  
110 -/* 查询内容的备考的边框 */  
111 -.xknr-rim{  
112 - display: flex;  
113 - width: 100%;  
114 - height: 55rpx;  
115 - line-height:105rpx;  
116 - margin-top:20rpx;  
117 -}  
118 -/* 明细查询 */  
119 -.botton{  
120 - margin-left: 30rpx;  
121 - margin-top: 50rpx;  
122 - background-color: #C4182E;  
123 - width: 95%;  
124 - border-radius:10rpx;  
125 - text-align: center;  
126 - height: 70rpx;  
127 - line-height: 70rpx;  
128 - color: #FFF;  
129 - font-size: 29rpx;  
130 - border: none;  
131 - font-family: 'SimHei',Arial;  
132 - }  
133 - /* 底部边框线  
134 - .bottom{  
135 - width: 100%;  
136 - border-bottom: 20rpx solid #eeeeee;  
137 - } */  
138 -  
139 -/*开始时间清空输入框的按钮*/  
140 -.empty{  
141 - width: 25rpx;  
142 - height: 25rpx;  
143 - border-radius:50%;  
144 - background: #767676;  
145 - color: #fff;  
146 - font-size: 25rpx;  
147 - text-align: center;  
148 - line-height:19rpx;  
149 -}  
150 -/*结束时间清空输入框的按钮*/  
151 -.end{  
152 - width: 25rpx;  
153 - height: 25rpx;  
154 - border-radius:50%;  
155 - background: #767676;  
156 - color: #fff;  
157 - font-size: 25rpx;  
158 - text-align: center;  
159 - line-height:19rpx;  
160 -  
161 -}  
162 -  
163 -/* 顶部 */  
164 -.top{  
165 - width: 170rpx;  
166 - height: 50rpx;  
167 - padding: 0 10rpx;  
168 - line-height: 50rpx;  
169 - font-size: 34rpx;  
170 - margin-top: 25rpx;  
171 - border-radius:3rpx;  
172 -}  
173 -.images{  
174 - width:35rpx;  
175 -height:35rpx;  
176 -margin-left:-9rpx;  
177 -margin-top:6rpx;  
178 -}  
179 -.rim-images{  
180 - width: 62rpx;  
181 - height: 46rpx;  
182 - line-height: 37rpx;  
183 - /* border-style: inset;padding:4rpx;text-align: center; */  
184 - background: #f1f1f1;  
185 - border-color:#000000;  
186 - border-width: 1rpx;  
187 - transform:translateX(28%);  
188 - margin-top:-3rpx;  
189 -border-radius:5rpx;  
190 -}  
191 -/* 下拉框 */  
192 -.top-selected{  
193 - width: 100%;  
194 - display: flex;  
195 - align-items: center;  
196 - justify-content: space-between;  
197 - border: 1px solid #ccc;  
198 - padding: 0 10rpx;  
199 - font-size: 30rpx;  
200 - background:#eeeeee;  
201 - height:50rpx;  
202 - border-radius:6rpx;  
203 -  
204 -}  
205 -.texts{  
206 - margin:0 auto;  
207 - font-size: 25rpx;  
208 -  
209 -}  
210 -/* 下拉内容 */  
211 -/* 下拉内容 */  
212 -.select-box {  
213 - background-color: #eeeeee;  
214 - width:190rpx;  
215 - position: relative;  
216 - z-index:1;  
217 - overflow: hidden;  
218 - text-align: left;  
219 - animation: myfirst 0.5s;  
220 - font-size: 25rpx;  
221 - border: 1px solid #DADADA;  
222 -}  
223 -.select_one {  
224 - padding-left: 20rpx;  
225 - width: 100%;  
226 - height: 60rpx;  
227 - line-height: 60rpx;  
228 -}  
229 -/* 优惠券样式 */  
230 -.body{  
231 - text-align: center;  
232 - padding: 20rpx;  
233 - margin: 20rpx auto;  
234 - width: 80%;  
235 - max-width: 1000rpx;  
236 - font-size: 28rpx;  
237 - color: #333333;  
238 - border-bottom: 2rpx solid #EEEEEE;  
239 -}  
240 -  
241 -.b_iimg{  
242 - background-color: red;  
243 - width: 400rpx;  
244 - height: 400rpx;  
245 -}  
246 -  
247 -.b_sz2{  
248 - font-size: 40rpx;  
249 - color: #6fd137;  
250 - margin: 20rpx 0;  
251 - text-align: center;  
252 -}  
253 -  
254 -/* 注释 */  
255 - .zs{  
256 - margin-left: 30rpx;  
257 - font-size: 25rpx;  
258 - color: #999999;  
259 - font-family: 'SimHei',Arial;  
260 - margin-top: 42rpx;  
261 - margin-bottom: 30rpx;  
262 - }  
263 - /* 项目边框 */  
264 - .db{  
265 - display: flex;  
266 - width: 100%;  
267 - height: 85rpx;  
268 - border-bottom: 2rpx solid #e8e8e8;  
269 - line-height: 85rpx;  
270 -}  
271 -/* 项目 */  
272 -.xm{  
273 -margin-left: 30rpx;  
274 - height:50rpx;  
275 - font-size: 30rpx;  
276 -color: #999999;  
277 -width: 50%;  
278 -vertical-align: middle;  
279 -}  
280 -/* 金额 */  
281 -.je{  
282 -text-align: right;  
283 -padding-right:30rpx;  
284 -height: 50rpx;  
285 - font-size: 30rpx;  
286 -color: #999999;  
287 -width: 50%;  
288 -vertical-align: middle;  
289 -  
290 -}  
291 -  
292 -/*数据*/  
293 -.data{  
294 - display: flex;  
295 - width: 100%;  
296 - border-bottom: 1px solid #E8E8E8;  
297 - height: 95rpx;  
298 -}  
299 -/*左边的数据 */  
300 -.left{  
301 - width:90%;  
302 - height: 120rpx;  
303 -}  
304 -/* 单据单号 */  
305 -.left-test{  
306 - margin-left: 30rpx;  
307 - padding-top: 11rpx;  
308 - font-size: 25rpx;  
309 - color: #000000;  
310 - width: 100%;  
311 -}  
312 -  
313 -/* 流动资金的加减 */  
314 -.val{  
315 - padding-top:20rpx;  
316 - padding-right:10rpx;  
317 - height: 70rpx;  
318 - width: 220rpx;  
319 - font-size: 30rpx;  
320 - font-family: 'SimHei',Arial;  
321 - padding-left:67rpx;  
322 -  
323 -}  
324 \ No newline at end of file 0 \ No newline at end of file
pages/user/member/account/account.js deleted
1 -var t = getApp(),  
2 - a = t.request,  
3 - o = t.globalData.setting,  
4 - os = o,  
5 - i = require("../../../../utils/util.js"),  
6 - ut = i,  
7 - s = require("../../../../utils/common.js");  
8 -var regeneratorRuntime = require('../../../../utils/runtime.js');  
9 -Page({  
10 - data: {  
11 - details:[],//数据  
12 - isBind:true,//控制清空时间日期的按钮  
13 - isBinds: true,  
14 - height: '',  
15 - pageSize: 10,  
16 - page: 1,  
17 - height: '',  
18 - datet:"",  
19 - dates:"",  
20 - current_page:0,  
21 - is_no_more:0,  
22 - },  
23 - //监听输入框显示清空按钮  
24 - watchPassWord: function (event) {  
25 - console.log("监听输入框显示清空按钮");  
26 - var val = event.detail.value;  
27 - console.log("是什么", val);  
28 - if (val != "" && val != null) {  
29 - var isBind = false;  
30 - this.setData({ isBind: isBind });  
31 -  
32 - }  
33 - },  
34 -  
35 - /**  
36 - * 生命周期函数--监听页面初次渲染完成  
37 - */  
38 - onReady: function () {  
39 -  
40 - },  
41 - //明细查询  
42 - Gettime:function(e){  
43 - var page= 0;  
44 - //开始获取时间  
45 - var th=this;  
46 - var stime = th.data.datet;  
47 - var etime = th.data.dates;  
48 -  
49 - console.log(stime, "开始结束" + etime );  
50 - //开始获取时间结束  
51 - console.log(stime, "结束开始", etime);  
52 - //删除字符中的——  
53 - var datatk = stime.replace(/[-]/g,"");  
54 - console.log("aaa", datak);  
55 - var dataj = etime.replace(/[-]/g, "");  
56 - console.log("开始", datatk, "结束", dataj);  
57 - //转换类型  
58 - var datak = parseInt(datatk);  
59 - var dataj = parseInt(dataj);  
60 - console.log("sk", datak, "js", dataj);  
61 - //判断初始时间小于结束时间  
62 - if(datak>dataj){  
63 - console.log("开始时间",datak,'结束时间',dataj,"时间判断",);  
64 - getApp().showWarning("结束时间错误");  
65 - }else{  
66 - console.log(datak, dataj, "时间判断2");  
67 - console.log("有进来吗", stime, etime);  
68 - this.setData({ details: []});  
69 - console.log("页数",this.data.page);  
70 - this.setData({ current_page: 0 });  
71 - this.lsmx();  
72 - }  
73 -  
74 - },  
75 - //流水明细  
76 - async lsmx() {  
77 - //if(this.data.is_no_more) return;  
78 - this.data.current_page++;  
79 - var stime = this.data.datet;  
80 - var etime = this.data.dates;  
81 - var user_id = getApp().globalData.user_id;  
82 - var store_id = os.stoid;  
83 - var e = this,  
84 - details = "";  
85 - var get_data = {  
86 - user_id: user_id, store_id: store_id,  
87 - pageSize:10, page: e.data.current_page  
88 - };  
89 -  
90 - if (etime != "" && etime != null) {  
91 - get_data.etime = etime;  
92 - }  
93 -  
94 - if (stime != "" && stime != null) {  
95 - get_data.stime = stime;  
96 - }  
97 - var big_arr=this.data.details;  
98 -  
99 - await getApp().request.promiseGet("/api/weshop/users/pageLiuDonGreCord", {  
100 - data: get_data, isShowLoading:1  
101 - }).then(res => {  
102 - var details = res.data;  
103 -  
104 - if (!details || !details.data || !details.data.pageData || details.data.pageData.length== 0){  
105 - this.data.is_no_more=1;  
106 - getApp().showWarning("未找更多数据");  
107 -  
108 - return false;  
109 - }  
110 -  
111 - var details=details.data.pageData;  
112 - // console.log("不空", details);  
113 - // console.log("长度", details.length);  
114 - details.forEach(function(val,ind){  
115 - big_arr.push(val);  
116 - })  
117 - setTimeout(() => {  
118 - this.setData({  
119 - details: big_arr  
120 - });  
121 - }, 1500)  
122 -  
123 -  
124 - })  
125 - },  
126 - /**  
127 - * 生命周期函数--监听页面加载  
128 - */  
129 - onLoad: function (options) {  
130 -  
131 - },  
132 - onShow: function () {  
133 -  
134 - this.lsmx();  
135 - wx.setNavigationBarTitle({  
136 - title: "流动资金明细 ",  
137 - });  
138 - wx.getSystemInfo({  
139 - success: (details) => {  
140 - this.setData({  
141 - height: details.windowHeight  
142 - })  
143 - }  
144 - })  
145 -  
146 - },  
147 - // //---加载更多是靠这个函数----  
148 - // onReachBottom: function () {  
149 -  
150 - // this.lsmx();  
151 -  
152 - // },  
153 -  
154 -  
155 - //起始时间  
156 - bindDateChenge: function(e) {  
157 - console.log("是什么", e.detail.value);  
158 - var isBind = false;  
159 - this.setData({  
160 - datet: e.detail.value, isBind: isBind  
161 - });  
162 - },  
163 - // 结束时间  
164 - bindDateChenges: function(e) {  
165 - console.log("是什么", e.detail.value);  
166 - var isBinds = false;  
167 - this.setData({  
168 - dates: e.detail.value, isBinds: isBinds  
169 - });  
170 - },  
171 - //catchtap阻止冒泡,点击清除开始时间的按钮  
172 - eliminate:function(){  
173 - console.log("试试");  
174 - var isBind= true;  
175 - var data="";  
176 - this.setData({ datet: data, isBind: isBind})  
177 - },  
178 - //catchtap阻止冒泡,点击清除结束时间的按钮  
179 - eliminates: function () {  
180 - console.log("试试");  
181 - var isBinds = true;  
182 - var dates = "";  
183 - this.setData({ dates: dates, isBinds: isBinds })  
184 - },  
185 -})  
186 \ No newline at end of file 0 \ No newline at end of file
pages/user/member/account/account.json deleted
1 -{}  
2 \ No newline at end of file 0 \ No newline at end of file
pages/user/member/account/account.wxml deleted
1 -<wxs module="filter" src="../filter.wxs"></wxs>  
2 -<view class="big-rim">  
3 - <form bindsubmit='Gettime'>  
4 - <view class="min-rim">  
5 - <view class="rq">日期:</view>  
6 - <picker mode="date" value='{{datet}}'start="2019/1/1" end=""  
7 - bindchange='bindDateChenge'>  
8 - <view calss="kspicker">  
9 - <view class='kssj'>  
10 - <text name="datat" class='kstext' value='{{datet}}'bindinput='watchPassWord' >{{datet}}</text></view>  
11 - <view class="empty"hidden='{{isBind}}'>  
12 - <button class="ksqc" catchtap="eliminate">x</button>  
13 - </view>  
14 - </view>  
15 - </picker>  
16 -  
17 - <view class="zi">至 </view>  
18 - <picker mode="date" value='{{dates}}' start="2019/1/1" end="" bindchange='bindDateChenges'>  
19 - <view class="jspicker">  
20 - <view class='jssj'>  
21 - <text name="datas" class='jstext' value='{{dates}}'>{{dates}}</text></view>  
22 - <view class="jspc"hidden="{{isBinds}}">  
23 - <button class="end" catchtap="eliminates">x</button>  
24 - </view>  
25 - </view>  
26 - </picker>  
27 - </view>  
28 - <button class="botton" form-type='submit'>查询明细</button>  
29 - </form>  
30 - <view class="zs">注: 读取时段内近10笔记录</view>  
31 -</view>  
32 -<view class="db">  
33 - <view class="xm">项目</view>  
34 - <view class="je">金额</view>  
35 -</view>  
36 -<view wx:if="{{details.lenght==0}}">  
37 - <view class="mysj">没有数据</view>  
38 -</view>  
39 -  
40 -<view wx:else>  
41 - <block wx:for="{{details}}"wx:for-index="idx" wx:for-item="details">  
42 - <view class="data">  
43 - <view class="left">  
44 - <view class='left-test'>  
45 - {{(details.type==0?"分成":(details.type==1?"提现-":(details.type==2?"退款-":(details.type==3?"购买-":(details.type==4||details.type==5?"返利-":(details.type==6?"转入-":""))))))}}单号<view class="card">{{details.order_sn}}</view>  
46 - </view>  
47 - <wxs module="dateUtil" src="index.wxs"></wxs>  
48 -  
49 - <!-- 不指定格式则默认输出:yyyy-MM-dd hh:mm:ss 格式 -->  
50 - <view class='time'>{{dateUtil.dateFormat(details.time)}}</view>  
51 -  
52 - </view>  
53 -  
54 - <view class="money"  
55 - style="color:{{details.type==2||details.type==0?'#C4182E':'#6fd137'}}">  
56 - {{details.type==1||details.type==3?'-':'+'}}{{filter.getNum(details.money)}}</view>  
57 - </view>  
58 - </block>  
59 -  
60 -</view>  
61 \ No newline at end of file 0 \ No newline at end of file
pages/user/member/account/account.wxss deleted
1 -/* 大边框 */  
2 -.big-rim{  
3 - margin-top: 15rpx;  
4 - width: 100%;  
5 - height: 275rpx;  
6 -border-bottom: 10px solid #EEEEEE;  
7 -}  
8 -.min-rim{  
9 -display: flex;  
10 -width: 100%;  
11 -height: auto;  
12 -  
13 -}  
14 -/* 开始时间 */  
15 -.kssj{  
16 -border-radius: 5px;  
17 -background-color: #EEEEEE;  
18 -border: 1px solid #DADADA;  
19 -width:220rpx;  
20 -height: 50rpx;  
21 -margin-top:5rpx;  
22 -margin-left:10rpx;  
23 -line-height:40rpx;  
24 -}  
25 -.kstext{  
26 - padding-bottom: 10rpx;  
27 -padding-left: 10rpx;  
28 -font-size: 25rpx;  
29 -color: #333;  
30 -font-family: 'SimHei',Arial;  
31 -}  
32 -/* 日期 */  
33 -.rq{  
34 - margin-top:12rpx;  
35 - font-size:30rpx;  
36 - font-family: 'SimHei',Arial;  
37 - margin-left:30rpx;  
38 -  
39 -}  
40 -/* 至 */  
41 -.zi{  
42 - margin-top:12rpx;  
43 - font-size:30rpx;  
44 - font-family: 'SimHei',Arial;  
45 - margin-left:20rpx;  
46 -}  
47 -/* 开始时间 边框 */  
48 -.kspicker{  
49 - position: relative;  
50 - top:0rpx;  
51 - left: 0rpx;  
52 -}  
53 -/* 结束时间边框 */  
54 -.jspicker{  
55 -position: relative;  
56 - top:0rpx;  
57 - left: 0rpx;  
58 - margin-left:20rpx;  
59 -  
60 -}  
61 -/* 结束时间 */  
62 -.jssj{  
63 -border-radius:5px;  
64 -background-color:#EEEEEE;  
65 -border:1px solid #DADADA;  
66 -width:220rpx;  
67 -height:50rpx;  
68 -margin-top:5rpx;  
69 -line-height:40rpx  
70 -}  
71 -.jstext{  
72 - padding-bottom: 10rpx;  
73 -padding-left: 10rpx;  
74 -font-size: 25rpx;  
75 -color: #333;  
76 -font-family: 'SimHei',Arial;  
77 -}  
78 -/* 明细查询 */  
79 -.botton{  
80 - margin-left: 30rpx;  
81 - margin-top: 40rpx;  
82 - background-color: #C4182E;  
83 - width: 92%;  
84 - border-radius:10rpx;  
85 - text-align: center;  
86 - height: 77rpx;  
87 - line-height: 77rpx;  
88 - color: #FFF;  
89 - font-size: 25rpx;  
90 - border: none;  
91 - font-family: 'SimHei',Arial;  
92 - }  
93 - /* 注释 */  
94 - .zs{  
95 - margin-left: 30rpx;  
96 - font-size: 25rpx;  
97 - color: #999999;  
98 - margin-top:37rpx;  
99 - font-family: 'SimHei',Arial;  
100 - }  
101 -.db{  
102 - display: flex;  
103 - width: 100%;  
104 - height: 90rpx;  
105 - border-bottom: 2rpx solid #e8e8e8;  
106 - line-height: 90rpx;  
107 - }  
108 -  
109 -  
110 -/* 项目 */  
111 -.xm{  
112 -margin-left: 30rpx;  
113 - height: 100rpx;  
114 - font-size: 30rpx;  
115 -color: #999999;  
116 -width: 50%;  
117 -vertical-align: middle;  
118 -  
119 -}  
120 -/* 金额 */  
121 -.je{  
122 - text-align: right;  
123 -padding-right:30rpx;  
124 - height: 100rpx;  
125 - font-size: 30rpx;  
126 -color: #999999;  
127 -width: 50%;  
128 -vertical-align: middle;  
129 -}  
130 -/* 没有数据 */  
131 -.mysj{  
132 - margin-top: 30rpx;  
133 - width: 100%;  
134 - height: 70rpx;  
135 - font-size: 34rpx;  
136 - text-align: center;  
137 - color: #888;  
138 -}  
139 -/*数据*/  
140 -.data{  
141 - display: flex;  
142 - width: 100%;  
143 - border-bottom: 1px solid #E8E8E8;  
144 - height: 114rpx;  
145 -}  
146 -/*左边的数据 */  
147 -.left{  
148 - width:70%;  
149 - height: 120rpx;  
150 -}  
151 -/* 单据单号 */  
152 -.left-test{  
153 - display: flex;  
154 - margin-left: 30rpx;  
155 - padding-top: 10rpx;  
156 - font-size: 30rpx;  
157 - color: #000000;  
158 - width: 100%;  
159 -}  
160 -/* 单据时间 */  
161 -.time{  
162 - margin-top: 10rpx;  
163 - font-size: 25rpx;  
164 - color: #999999;  
165 - width: 100%;  
166 - margin-left:34rpx;  
167 -  
168 -}  
169 -/* 流动资金的加减 */  
170 -.money{  
171 - padding-top:20rpx;  
172 - height: 70rpx;  
173 - width: 120rpx;  
174 - margin-left:80rpx;  
175 - font-size: 30rpx;  
176 - font-family: 'SimHei',Arial;  
177 - text-align:right;  
178 -}  
179 -/*开始时间清空输入框的按钮*/  
180 -.empty{  
181 - position: absolute;  
182 - top: 25rpx;  
183 - left:316rpx;  
184 -  
185 -}  
186 -/*结束时间清空输入框的按钮*/  
187 -.end{  
188 - width: 25rpx;  
189 - height: 25rpx;  
190 - border-radius:50%;  
191 - background: #767676;  
192 - color: #fff;  
193 - font-size: 25rpx;  
194 - text-align: center;  
195 - line-height:19rpx;  
196 -  
197 -  
198 -}  
199 -/* 开始 */  
200 -.ksqc{  
201 - width: 25rpx;  
202 - height: 25rpx;  
203 - border-radius:50%;  
204 - background: #767676;  
205 - color: #fff;  
206 - font-size: 25rpx;  
207 - text-align: center;  
208 - line-height:19rpx;  
209 -  
210 -}  
211 -.jspc{  
212 -  
213 - position:absolute;  
214 - top:7rpx;  
215 - left:190rpx  
216 -}  
217 -  
218 -/* 单号 */  
219 -.card{  
220 - width: 360rpx;  
221 - height: auto;  
222 - text-overflow: ellipsis;  
223 - white-space:nowrap;  
224 - overflow:hidden;  
225 -  
226 -}  
227 \ No newline at end of file 0 \ No newline at end of file
pages/user/member/account/index.wxs deleted
1 -var formatNumber = function (n) {  
2 - n = n.toString()  
3 - return n[1] ? n : '0' + n  
4 -}  
5 -  
6 -var regYear = getRegExp("(y+)", "i");  
7 -  
8 -var dateFormat = function (timestamp, format) {  
9 - if (!format) {  
10 - format = "yyyy-MM-dd hh:mm:ss";  
11 - }  
12 - timestamp = parseInt(timestamp)*1000;;  
13 - var realDate = getDate(timestamp);  
14 - function timeFormat(num) {  
15 - return num < 10 ? '0' + num : num;  
16 - }  
17 - var date = [  
18 - ["M+", timeFormat(realDate.getMonth() + 1)],  
19 - ["d+", timeFormat(realDate.getDate())],  
20 - ["h+", timeFormat(realDate.getHours())],  
21 - ["m+", timeFormat(realDate.getMinutes())],  
22 - ["s+", timeFormat(realDate.getSeconds())],  
23 - ["q+", Math.floor((realDate.getMonth() + 3) / 3)],  
24 - ["S+", realDate.getMilliseconds()],  
25 - ];  
26 - var reg1 = regYear.exec(format);  
27 - // console.log(reg1[0]);  
28 - if (reg1) {  
29 -  
30 - format = format.replace(reg1[1], (realDate.getFullYear() + '').substring(4 - reg1[1].length));  
31 - }  
32 - for (var i = 0; i < date.length; i++) {  
33 - var k = date[i][0];  
34 - var v = date[i][1];  
35 -  
36 - var reg2 = getRegExp("(" + k + ")").exec(format);  
37 - if (reg2) {  
38 - format = format.replace(reg2[1], reg2[1].length == 1  
39 - ? v : ("00" + v).substring(("" + v).length));  
40 - }  
41 - }  
42 - return format;  
43 -}  
44 -  
45 -  
46 -module.exports = {  
47 - dateFormat: dateFormat  
48 -};  
49 -  
50 -  
51 -function parse(fmt) {  
52 -  
53 - var a = fmt.slice(0, 4);  
54 - console.log("a",a);  
55 - var b=+"-";  
56 - console.log("b", b);  
57 - var c = fmt.slice(5, 7);  
58 - var d=+"-";  
59 - console.log("d", d);  
60 - var e = fmt.slice(8, 9);  
61 - console.log("e", e);  
62 -  
63 -}  
64 \ No newline at end of file 0 \ No newline at end of file
pages/user/member/account_unable/account_unable.js deleted
1 -var t = getApp(),  
2 - a = t.request,  
3 - o = t.globalData.setting,  
4 - os = o,  
5 - i = require("../../../../utils/util.js"),  
6 - ut = i,  
7 - s = require("../../../../utils/common.js");  
8 -var regeneratorRuntime = require('../../../../utils/runtime.js');  
9 -Page({  
10 - data: {  
11 - details: [],//数据  
12 - isBind: true,//控制清空时间日期的按钮  
13 - isBinds: true,  
14 - height: '',  
15 - pageSize: 10,  
16 - page: 1,  
17 - height: '',  
18 - datet: "",  
19 - dates: "",  
20 - current_page: 0,  
21 - is_no_more: 0,  
22 - },  
23 - //监听输入框显示清空按钮  
24 - watchPassWord: function (event) {  
25 - console.log("监听输入框显示清空按钮");  
26 - var val = event.detail.value;  
27 - console.log("是什么", val);  
28 - if (val != "" && val != null) {  
29 - var isBind = false;  
30 - this.setData({ isBind: isBind });  
31 -  
32 - }  
33 - },  
34 -  
35 - /**  
36 - * 生命周期函数--监听页面初次渲染完成  
37 - */  
38 - onReady: function () {  
39 -  
40 - },  
41 - //明细查询  
42 - Gettime: function (e) {  
43 - var page = 0;  
44 - //开始获取时间  
45 - var th = this;  
46 - var stime = th.data.datet;  
47 - var etime = th.data.dates;  
48 -  
49 - console.log(stime, "开始结束" + etime);  
50 - //开始获取时间结束  
51 - console.log(stime, "结束开始", etime);  
52 - //删除字符中的——  
53 - var datatk = stime.replace(/[-]/g, "");  
54 - console.log("aaa", datak);  
55 - var dataj = etime.replace(/[-]/g, "");  
56 - console.log("开始", datatk, "结束", dataj);  
57 - //转换类型  
58 - var datak = parseInt(datatk);  
59 - var dataj = parseInt(dataj);  
60 - console.log("sk", datak, "js", dataj);  
61 - //判断初始时间小于结束时间  
62 - if (datak > dataj) {  
63 - console.log("开始时间", datak, '结束时间', dataj, "时间判断");  
64 - getApp().showWarning("结束时间错误");  
65 - } else {  
66 - console.log(datak, dataj, "时间判断2");  
67 - console.log("有进来吗", stime, etime);  
68 - this.setData({ details: [] });  
69 - console.log("页数", this.data.page);  
70 - this.setData({ current_page: 0 });  
71 - this.lsmx();  
72 - }  
73 -  
74 - },  
75 - //流水明细  
76 - async lsmx() {  
77 - //if(this.data.is_no_more) return;  
78 - this.data.current_page++;  
79 - var stime = this.data.datet;  
80 - var etime = this.data.dates;  
81 - var user_id = getApp().globalData.user_id;  
82 - var store_id = os.stoid;  
83 - var e = this,  
84 - details = "";  
85 - var get_data = {  
86 - user_id: user_id, store_id: store_id,  
87 - pageSize: 10, page: e.data.current_page  
88 - };  
89 -  
90 - if (etime != "" && etime != null) {  
91 - get_data.etime = etime;  
92 - }  
93 -  
94 - if (stime != "" && stime != null) {  
95 - get_data.stime = stime;  
96 - }  
97 - var big_arr = this.data.details;  
98 -  
99 - await getApp().request.promiseGet("/api/weshop/users/pageUnablereCord", {  
100 - data: get_data, isShowLoading: 1  
101 - }).then(res => {  
102 -  
103 - var details = res.data;  
104 -  
105 - if ( !details || !details.data || !details.data.pageData || details.data.pageData.length == 0) {  
106 - this.data.is_no_more = 1;  
107 - getApp().showWarning("未找更多数据");  
108 - return false;  
109 - }  
110 -  
111 - var details = details.data.pageData;  
112 - // console.log("不空", details);  
113 - // console.log("长度", details.length);  
114 - details.forEach(function (val, ind) {  
115 - big_arr.push(val);  
116 - })  
117 - setTimeout(() => {  
118 - this.setData({  
119 - details: big_arr  
120 - });  
121 - }, 1500)  
122 -  
123 -  
124 - })  
125 - },  
126 - /**  
127 - * 生命周期函数--监听页面加载  
128 - */  
129 - onLoad: function (options) {  
130 -  
131 - },  
132 - onShow: function () {  
133 -  
134 - this.lsmx();  
135 - wx.setNavigationBarTitle({  
136 - title: "不可用资金明细",  
137 - });  
138 - wx.getSystemInfo({  
139 - success: (details) => {  
140 - this.setData({  
141 - height: details.windowHeight  
142 - })  
143 - }  
144 - })  
145 -  
146 - },  
147 - //---加载更多是靠这个函数----  
148 - // onReachBottom: function () {  
149 -  
150 - // this.lsmx();  
151 -  
152 - // },  
153 -  
154 -  
155 - //起始时间  
156 - bindDateChenge: function (e) {  
157 - console.log("是什么", e.detail.value);  
158 - var isBind = false;  
159 - this.setData({  
160 - datet: e.detail.value, isBind: isBind  
161 - });  
162 - },  
163 - // 结束时间  
164 - bindDateChenges: function (e) {  
165 - console.log("是什么", e.detail.value);  
166 - var isBinds = false;  
167 - this.setData({  
168 - dates: e.detail.value, isBinds: isBinds  
169 - });  
170 - },  
171 - //catchtap阻止冒泡,点击清除开始时间的按钮  
172 - eliminate: function () {  
173 - console.log("试试");  
174 - var isBind = true;  
175 - var data = "";  
176 - this.setData({ datet: data, isBind: isBind })  
177 - },  
178 - //catchtap阻止冒泡,点击清除结束时间的按钮  
179 - eliminates: function () {  
180 - console.log("试试");  
181 - var isBinds = true;  
182 - var dates = "";  
183 - this.setData({ dates: dates, isBinds: isBinds })  
184 - },  
185 -})  
186 \ No newline at end of file 0 \ No newline at end of file
pages/user/member/account_unable/account_unable.json deleted
1 -{  
2 - "usingComponents": {}  
3 -}  
4 \ No newline at end of file 0 \ No newline at end of file
pages/user/member/account_unable/account_unable.wxml deleted
1 -<wxs module="filter" src="../filter.wxs"></wxs>  
2 -<view class="big-rim">  
3 - <form bindsubmit='Gettime'>  
4 - <view class="min-rim">  
5 - <view class="rq">日期:</view>  
6 - <picker mode="date" value='{{datet}}'start="2019/1/1" end=""  
7 - bindchange='bindDateChenge'>  
8 - <view calss="kspicker">  
9 - <view class='kssj'>  
10 - <text name="datat" class='kstext' value='{{datet}}'bindinput='watchPassWord' >{{datet}}</text></view>  
11 - <view class="empty"hidden='{{isBind}}'>  
12 - <button class="ksqc" catchtap="eliminate">x</button>  
13 - </view>  
14 - </view>  
15 - </picker>  
16 -  
17 - <view class="zi">至 </view>  
18 - <picker mode="date" value='{{dates}}' start="2019/1/1" end="" bindchange='bindDateChenges'>  
19 - <view class="jspicker">  
20 - <view class='jssj'>  
21 - <text name="datas" class='jstext' value='{{dates}}'>{{dates}}</text></view>  
22 - <view class="jspc"hidden="{{isBinds}}">  
23 - <button class="end" catchtap="eliminates">x</button>  
24 - </view>  
25 - </view>  
26 - </picker>  
27 - </view>  
28 - <button class="botton" form-type='submit'>查询明细</button>  
29 - </form>  
30 - <view class="zs">注: 读取时段内近10笔记录</view>  
31 -</view>  
32 -<view class="db">  
33 - <view class="xm">项目</view>  
34 - <view class="je">金额</view>  
35 -</view>  
36 -<view wx:if="{{details.lenght==0}}">  
37 - <view class="mysj">没有数据</view>  
38 -</view>  
39 -  
40 -<view wx:else>  
41 - <block wx:for="{{details}}"wx:for-index="idx" wx:for-item="details">  
42 - <view class="data">  
43 - <view class="left">  
44 - <view class='left-test'>  
45 - 单号{{details.order_sn}}  
46 -  
47 - <wxs module="dateUtil" src="index.wxs"></wxs>  
48 -  
49 - <!-- 不指定格式则默认输出:yyyy-MM-dd hh:mm:ss 格式 -->  
50 - <view class='time'>{{dateUtil.dateFormat(details.create_time)}}</view>  
51 - </view>  
52 - </view>  
53 -  
54 - <view class="money"  
55 - style="color:{{details.type=='1'?'#6fd137':'#C4182E'}}">  
56 - {{details.type==1?'-':'+'}}{{filter.getNum(details.money)}}</view>  
57 - </view>  
58 - </block>  
59 -  
60 -</view>  
pages/user/member/account_unable/account_unable.wxss deleted
1 -/* 大边框 */  
2 -.big-rim{  
3 - margin-top: 15rpx;  
4 - width: 100%;  
5 - height: 275rpx;  
6 -border-bottom: 10px solid #EEEEEE;  
7 -}  
8 -.min-rim{  
9 -display: flex;  
10 -width: 100%;  
11 -height: auto;  
12 -  
13 -}  
14 -/* 开始时间 */  
15 -.kssj{  
16 -border-radius: 5px;  
17 -background-color: #EEEEEE;  
18 -border: 1px solid #DADADA;  
19 -width:220rpx;  
20 -height: 50rpx;  
21 -margin-top:5rpx;  
22 -margin-left:10rpx;  
23 -line-height:40rpx;  
24 -  
25 -  
26 -}  
27 -.kstext{  
28 - padding-bottom: 10rpx;  
29 -padding-left: 10rpx;  
30 -font-size: 25rpx;  
31 -color: #333;  
32 -font-family: 'SimHei',Arial;  
33 -}  
34 -/* 日期 */  
35 -.rq{  
36 - margin-top:12rpx;  
37 - font-size:30rpx;  
38 - font-family: 'SimHei',Arial;  
39 - margin-left:30rpx;  
40 -  
41 -}  
42 -/* 至 */  
43 -.zi{  
44 - margin-top:12rpx;  
45 - font-size:30rpx;  
46 - font-family: 'SimHei',Arial;  
47 - margin-left:20rpx;  
48 -}  
49 -/* 开始时间 边框 */  
50 -.kspicker{  
51 - position: relative;  
52 - top:0rpx;  
53 - left: 0rpx;  
54 -}  
55 -/* 结束时间边框 */  
56 -.jspicker{  
57 -position: relative;  
58 - top:0rpx;  
59 - left: 0rpx;  
60 - margin-left:20rpx;  
61 -  
62 -}  
63 -/* 结束时间 */  
64 -.jssj{  
65 -border-radius:5px;  
66 -background-color:#EEEEEE;  
67 -border:1px solid #DADADA;  
68 -width:220rpx;  
69 -height:50rpx;  
70 -margin-top:5rpx;  
71 -line-height:40rpx;  
72 -  
73 -}  
74 -.jstext{  
75 - padding-bottom: 10rpx;  
76 -padding-left: 10rpx;  
77 -font-size: 25rpx;  
78 -color: #333;  
79 -font-family: 'SimHei',Arial;  
80 -}  
81 -/* 明细查询 */  
82 -.botton{  
83 - margin-left: 30rpx;  
84 - margin-top: 40rpx;  
85 - background-color: #C4182E;  
86 - width: 92%;  
87 - border-radius:10rpx;  
88 - text-align: center;  
89 - height: 77rpx;  
90 - line-height: 77rpx;  
91 - color: #FFF;  
92 - font-size: 25rpx;  
93 - border: none;  
94 - font-family: 'SimHei',Arial;  
95 - }  
96 - /* 注释 */  
97 - .zs{  
98 - margin-left: 30rpx;  
99 - font-size: 25rpx;  
100 - color: #999999;  
101 - margin-top:37rpx;  
102 - font-family: 'SimHei',Arial;  
103 - }  
104 -.db{  
105 - display: flex;  
106 - width: 100%;  
107 - height: 90rpx;  
108 - border-bottom: 2rpx solid #e8e8e8;  
109 - line-height: 90rpx;  
110 - }  
111 -  
112 -  
113 -/* 项目 */  
114 -.xm{  
115 -margin-left: 30rpx;  
116 - height: 100rpx;  
117 - font-size: 30rpx;  
118 -color: #999999;  
119 -width: 50%;  
120 -vertical-align: middle;  
121 -  
122 -}  
123 -/* 金额 */  
124 -.je{  
125 - text-align: right;  
126 -padding-right:30rpx;  
127 - height: 100rpx;  
128 - font-size: 30rpx;  
129 -color: #999999;  
130 -width: 50%;  
131 -vertical-align: middle;  
132 -}  
133 -/* 没有数据 */  
134 -.mysj{  
135 - margin-top: 30rpx;  
136 - width: 100%;  
137 - height: 70rpx;  
138 - font-size: 34rpx;  
139 - text-align: center;  
140 - color: #888;  
141 -}  
142 -/*数据*/  
143 -.data{  
144 - display: flex;  
145 - width: 100%;  
146 - border-bottom: 1px solid #E8E8E8;  
147 - height: 114rpx;  
148 -}  
149 -/*左边的数据 */  
150 -.left{  
151 - width:70%;  
152 - height: 120rpx;  
153 -}  
154 -/* 单据单号 */  
155 -.left-test{  
156 - margin-left: 30rpx;  
157 - padding-top: 20rpx;  
158 - font-size: 30rpx;  
159 - color: #000000;  
160 - width: 100%;  
161 -}  
162 -/* 单据时间 */  
163 -.time{  
164 - margin-top: 10rpx;  
165 - font-size: 25rpx;  
166 - color: #999999;  
167 - width: 100%;  
168 -}  
169 -/* 流动资金的加减 */  
170 -.money{  
171 - padding-top:20rpx;  
172 - height: 70rpx;  
173 - width: 120rpx;  
174 - margin-left:80rpx;  
175 - font-size: 30rpx;  
176 - font-family: 'SimHei',Arial;  
177 - text-align:right;  
178 -}  
179 -/*开始时间清空输入框的按钮*/  
180 -.empty{  
181 - position: absolute;  
182 - top: 25rpx;  
183 - left:316rpx;  
184 -  
185 -}  
186 -/*结束时间清空输入框的按钮*/  
187 -.end{  
188 - width: 25rpx;  
189 - height: 25rpx;  
190 - border-radius:50%;  
191 - background: #767676;  
192 - color: #fff;  
193 - font-size: 25rpx;  
194 - text-align: center;  
195 - line-height:19rpx;  
196 -  
197 -  
198 -}  
199 -/* 开始 */  
200 -.ksqc{  
201 - width: 25rpx;  
202 - height: 25rpx;  
203 - border-radius:50%;  
204 - background: #767676;  
205 - color: #fff;  
206 - font-size: 25rpx;  
207 - text-align: center;  
208 - line-height:19rpx;  
209 -  
210 -}  
211 -.jspc{  
212 - position:absolute;  
213 - top:7rpx;  
214 - left:190rpx  
215 -}  
216 \ No newline at end of file 0 \ No newline at end of file
pages/user/member/account_unable/index.wxs deleted
1 -var formatNumber = function (n) {  
2 - n = n.toString()  
3 - return n[1] ? n : '0' + n  
4 -}  
5 -  
6 -var regYear = getRegExp("(y+)", "i");  
7 -  
8 -var dateFormat = function (timestamp, format) {  
9 - if (!format) {  
10 - format = "yyyy-MM-dd hh:mm:ss";  
11 - }  
12 - timestamp = parseInt(timestamp)*1000;;  
13 - var realDate = getDate(timestamp);  
14 - function timeFormat(num) {  
15 - return num < 10 ? '0' + num : num;  
16 - }  
17 - var date = [  
18 - ["M+", timeFormat(realDate.getMonth() + 1)],  
19 - ["d+", timeFormat(realDate.getDate())],  
20 - ["h+", timeFormat(realDate.getHours())],  
21 - ["m+", timeFormat(realDate.getMinutes())],  
22 - ["s+", timeFormat(realDate.getSeconds())],  
23 - ["q+", Math.floor((realDate.getMonth() + 3) / 3)],  
24 - ["S+", realDate.getMilliseconds()],  
25 - ];  
26 - var reg1 = regYear.exec(format);  
27 - // console.log(reg1[0]);  
28 - if (reg1) {  
29 -  
30 - format = format.replace(reg1[1], (realDate.getFullYear() + '').substring(4 - reg1[1].length));  
31 - }  
32 - for (var i = 0; i < date.length; i++) {  
33 - var k = date[i][0];  
34 - var v = date[i][1];  
35 -  
36 - var reg2 = getRegExp("(" + k + ")").exec(format);  
37 - if (reg2) {  
38 - format = format.replace(reg2[1], reg2[1].length == 1  
39 - ? v : ("00" + v).substring(("" + v).length));  
40 - }  
41 - }  
42 - return format;  
43 -}  
44 -  
45 -  
46 -module.exports = {  
47 - dateFormat: dateFormat  
48 -};  
49 -  
50 -  
51 -function parse(fmt) {  
52 -  
53 - var a = fmt.slice(0, 4);  
54 - console.log("a",a);  
55 - var b=+"-";  
56 - console.log("b", b);  
57 - var c = fmt.slice(5, 7);  
58 - var d=+"-";  
59 - console.log("d", d);  
60 - var e = fmt.slice(8, 9);  
61 - console.log("e", e);  
62 -  
63 -}  
64 \ No newline at end of file 0 \ No newline at end of file
pages/user/member/bring/bring.js deleted
1 -var t = getApp(),  
2 - a = t.request,  
3 - o = t.globalData.setting,  
4 - os = o,  
5 - i = require("../../../../utils/util.js"),  
6 - ut = i,  
7 - s = require("../../../../utils/common.js");  
8 -var regeneratorRuntime = require('../../../../utils/runtime.js');  
9 -var oo = t.globalData.setting;  
10 -Page({  
11 - /**  
12 - * 页面的初始数据  
13 - */  
14 - data: {  
15 - usernames: null,  
16 - val: null, //提现金额内容  
17 - current: 1, //单选框判断的参数  
18 - user_money: 0, //可提现余额  
19 - // money:0,//提现金额  
20 - account_bank: "", //银行卡号  
21 - bank_name: "", //银行名字  
22 - button: 0, //按钮样式控制器、  
23 - submit: null, //点击控制器  
24 - weixin: 0,  
25 - cardInfo: '',  
26 - user_infor: {}, //获取初始对象  
27 - needmon:0,  
28 - distribut_min:0  
29 - },  
30 - // 银行卡失去焦点事件  
31 - blurInputEvent: function(e) {  
32 - var inputvalue = e.detail.value.length;  
33 - if (inputvalue > 14) {  
34 - var value = e.detail.value;  
35 - var account_bank = value.replace(/\s+/g, "");  
36 - this.yhk(account_bank);  
37 -  
38 - }  
39 -  
40 - },  
41 - /** 获取提现输入框的值 bindinput='genre' */  
42 - money: function(e) {  
43 - this.setData({  
44 - money: Number(e.detail.value)  
45 - })  
46 - },  
47 - // 单选框控制器  
48 - onClickItem(e) {  
49 - console.log(" 单选框控制器", e.currentTarget.dataset.idx) //获取自定义的值  
50 - let idx = e.currentTarget.dataset.idx;  
51 - this.setData({  
52 - current: idx  
53 - })  
54 -  
55 - },  
56 - /*点击确定提现后表现的形式*/  
57 - Gettime: function(e) {  
58 - var user_money = this.data.user_money;  
59 - var money = e.detail.value.moneys; //typeof判断数据类型  
60 - var current = this.data.current;  
61 - var money = Number(money);  
62 -  
63 - if (user_money<this.data.needmon) return false;  
64 -  
65 - if (money == 0 || money == "" || money == null) {  
66 - getApp().showWarning("请输入提现金额");  
67 - return false;  
68 - }  
69 -  
70 - if (this.data.distribut_min > money){  
71 - getApp().showWarning("提现需大于"+this.data.distribut_min+"元");  
72 - return false;  
73 -  
74 - }  
75 - if (Number(user_money) < Number(money)) {  
76 - console.log(money + "有qq吗" + user_money + typeof this.data.money);  
77 - getApp().showWarning("提现金额大于余额");  
78 - return false;  
79 -  
80 - } else if (money > 0 || user_money >= money && user_money > 99) {  
81 - if (current == 1) {  
82 - console.log(user_money + "有进来吗eeee" + money);  
83 - // 获取输入框中的值  
84 - var moneys = e.detail.value.moneys; //钱  
85 - var cardname = this.data.bank_name; //卡名  
86 - var userName = e.detail.value.userName; //名字  
87 - var card = e.detail.value.card; //卡号  
88 -  
89 -  
90 - if (card.length < 15) {  
91 - getApp().showWarning("卡号错误");  
92 - this.setData({  
93 - bank_name: "",  
94 - usernames: ""  
95 - });  
96 - return false;  
97 - }  
98 - console.log("钱", moneys, "卡", cardname, "名字", userName, "卡的长度", card.length);  
99 - var len = userName.length; //名字的长度  
100 - if (userName.indexOf(" ") >= 0) {  
101 - getApp().showWarning("名字不能有空");  
102 - return false;  
103 -  
104 - }  
105 -  
106 -  
107 - console.log("字符串的长度", len);  
108 - if (this.data.current == 1) {  
109 - if (cardname == null || cardname == "") {  
110 - getApp().showWarning("银行卡不存在");  
111 - return false;  
112 -  
113 - }  
114 - if (userName == "" || userName == null) {  
115 - getApp().showWarning("名字不能为空");  
116 - return false;  
117 - }  
118 - if (len < 2) {  
119 - getApp().showWarning("名字错误");  
120 - return false;  
121 - }  
122 - if (!/^[\u4e00-\u9fa5]+$/i.test(userName)) {  
123 - getApp().showWarning("您输入不是中文");  
124 - return false;  
125 - }  
126 -  
127 - }  
128 - var that = this;  
129 - //控制器参数  
130 - var user_id = getApp().globalData.user_id;  
131 - var store_id = os.stoid;  
132 -  
133 - var current = that.data.current;  
134 - var userName = e.detail.value.userName; //名字  
135 - console.log('微信余额名字', userName, "控制器", current);  
136 - this.data.user_infor.money = moneys;  
137 - this.data.user_infor.user_id = user_id;  
138 - this.data.user_infor.store_id = store_id;  
139 - this.data.user_infor.account_name = userName;  
140 - this.data.user_infor.account_bank = card;  
141 - this.data.user_infor.bank_name = cardname;  
142 - this.data.user_infor.bank_type = this.data.current;  
143 - var user_infor = this.data.user_infor;  
144 - this.Cashwithdrawal(user_infor)  
145 - } else {  
146 - var userName = e.detail.value.userName; //名字  
147 - var len = userName.length; //名字的长度  
148 - if (userName.indexOf(" ") >= 0) {  
149 - getApp().showWarning("名字不能有空");  
150 - return false;  
151 -  
152 - }  
153 - if (userName == "" || userName == null) {  
154 - getApp().showWarning("名字不能为空");  
155 - return false;  
156 - }  
157 - if (len < 2) {  
158 - getApp().showWarning("名字错误");  
159 - return false;  
160 - }  
161 - if (!/^[\u4e00-\u9fa5]+$/i.test(userName)) {  
162 - getApp().showWarning("您输入不是中文");  
163 - return false;  
164 - }  
165 - var moneys = e.detail.value.moneys; //钱  
166 - var user_id = getApp().globalData.user_id;  
167 - var store_id = os.stoid;  
168 - var len = userName.length;  
169 - this.data.user_infor.money = moneys;  
170 - this.data.user_infor.user_id = user_id;  
171 - this.data.user_infor.store_id = store_id;  
172 - this.data.user_infor.account_name = userName;  
173 - this.data.user_infor.bank_type = this.data.current;  
174 - var user_infor = this.data.user_infor;  
175 -  
176 - console.log("控制器2", user_infor);  
177 - this.Cashwithdrawal(user_infor);  
178 - }  
179 - } else {  
180 - console.log( "提现金额小于",this.data.distribut_min);  
181 - getApp().showWarning("提现金额小于"+this.data.distribut_min);  
182 -  
183 -  
184 - }  
185 - },  
186 -  
187 - // 提现  
188 - Cashwithdrawal: function(user_infor) {  
189 - delete user_infor.rmon;  
190 - delete user_infor.isck;  
191 - delete user_infor.needmon;  
192 - delete user_infor.liudong_money;  
193 - delete user_infor.distribut_min;  
194 - delete user_infor.type;  
195 -  
196 - user_infor.source_type=1;  
197 - var str = JSON.stringify(user_infor);  
198 - // wx.showLoading({ title: "加载中" });  
199 - wx.request({  
200 - url: oo.url + '/api/weshop/users/saveWithdrawals',  
201 - data: str,  
202 - method: 'POST',  
203 - header: {  
204 - 'content-type': 'application/json'  
205 - }, // 设置请求的 header  
206 - success: function(res) {  
207 - if (res.data.code != -1) {  
208 - wx.navigateTo({  
209 - url: 'msg/msg',  
210 - })  
211 - } else {  
212 - getApp().showWarning("提现金额不足");  
213 - }  
214 - },  
215 - fail: function() {  
216 - getApp().showWarning("出现错误");  
217 - },  
218 -  
219 -  
220 - })  
221 -  
222 - },  
223 -  
224 - // 初始化判断微信余额  
225 - async weixin() {  
226 - var user_id = getApp().globalData.user_id;  
227 - var store_id = os.stoid;  
228 - await getApp().request.promiseGet("/api/weshop/users/getWithdrawals", {  
229 - data: {  
230 - user_id: user_id,  
231 - store_id: store_id  
232 - }  
233 - }).then(res => {  
234 - var a = res.data;  
235 - var user_infor = a.data;  
236 - var user_money = user_infor.liudong_money;  
237 - var distribut_min=user_infor.distribut_min;  
238 - console.log( user_money,distribut_min,user_infor, "初始化出来的数据", a.data.account_bank);  
239 - if (user_money > distribut_min) {  
240 - this.setData({  
241 - submit: "submit",  
242 - button: user_money,  
243 - user_money: user_money,  
244 - distribut_min: distribut_min  
245 - });  
246 -  
247 - } else {  
248 - this.setData({  
249 - submit: " ",  
250 - button: user_money,  
251 - user_money:user_money,  
252 - distribut_min: distribut_min  
253 - })  
254 - }  
255 - console.log(typeof user_money, "ooo" + user_money);  
256 - if (a.code != -1) {  
257 - this.setData({  
258 - user_infor: user_infor,  
259 -  
260 - });  
261 - if (a.data.account_bank != null) {  
262 - var account_bank = a.data.account_bank.replace(/\s+/g, "");  
263 - console.log("卡号", account_bank, "初始化", a.data.isck);  
264 - if (a.data.isck == 1) {  
265 - this.setData({  
266 -  
267 - bank_name: a.data.bank_name,  
268 - account_bank: account_bank,  
269 - usernames: a.data.account_name,  
270 - distribut_min: a.data.distribut_min,  
271 - user_money: user_money,  
272 - needmon:a.data.needmon,  
273 -  
274 - });  
275 - } else {  
276 - this.setData({  
277 -  
278 - bank_name: a.data.bank_name,  
279 - account_bank: account_bank,  
280 - usernames: a.data.account_name,  
281 - distribut_min: a.data.distribut_min,  
282 - user_money: user_money,  
283 - needmon:a.data.needmon,  
284 - });  
285 - }  
286 - }  
287 - }  
288 - })  
289 -  
290 - },  
291 -  
292 - //银行卡  
293 - async yhk(account_bank) {  
294 - console.log("有进来吗银行卡" + account_bank);  
295 - var e = this,  
296 - bank_name = "";  
297 - await getApp().request.promiseGet("/api/weshop/users/getBankName", {  
298 - data: {  
299 - bankno: account_bank,  
300 - }  
301 - }).then(res => {  
302 - var a = res.data;  
303 - if (a.data == null) {  
304 - console.log("来了吗");  
305 - getApp().showWarning("银行卡不存在");  
306 - this.setData({  
307 - bank_name: " "  
308 - });  
309 - return false;  
310 - }  
311 - console.log(a);  
312 - bank_name = a.data.bank_name;  
313 - console.log("s1w" + bank_name);  
314 -  
315 - })  
316 - e.setData({  
317 - bank_name: bank_name  
318 - });  
319 - },  
320 - /**  
321 - * 生命周期函数--监听页面初次渲染完成  
322 - */  
323 - onReady: function() {  
324 -  
325 - },  
326 -  
327 - /**  
328 - * 生命周期函数--监听页面显示  
329 - */  
330 - onShow: function() {  
331 - getApp().check_can_share();  
332 - var th=this;  
333 - this.weixin();  
334 - this.setData({  
335 - button: 0  
336 - });  
337 - var user_info = getApp().globalData.userInfo;  
338 - if (user_info == null || user_info.mobile == undefined || user_info.mobile == " " || user_info.mobile == null) {  
339 - wx.navigateTo({  
340 - url: '/pages/togoin/togoin',  
341 - })  
342 - return false;  
343 - }  
344 - this.setData({  
345 - val: null  
346 - })  
347 - wx.setNavigationBarTitle({  
348 - title: "流动资金提现",  
349 - });  
350 -  
351 - //优惠券要实时更新  
352 - getApp().getConfig2(function(e) {  
353 - var json_d = JSON.parse(e.switch_list);  
354 - var is_closetxbank=json_d.is_closetxbank;  
355 - var is_tx_wx=json_d.is_tx_wx;  
356 - var data={  
357 - is_closetxbank:is_closetxbank,is_tx_wx:is_tx_wx  
358 - };  
359 - if(is_closetxbank) data.current=2;  
360 - th.setData(data);  
361 -  
362 - },1)  
363 - },  
364 - //提取金额的输入框事件  
365 - defocus: function (event){  
366 - var money = Number(event.detail.value);  
367 - var val =this.data.distribut_min;  
368 - console.log(Number(val).length, "sss", val, "提取金额的输入框事件", money.length, typeof Number(event.detail.value), money);  
369 - console.log("keyCode", event.detail.keyCode);  
370 - if (event.detail.keyCode ==8){  
371 - return false};  
372 -  
373 - if (money<this.data.distribut_min){  
374 - var val = this.data.distribut_min;  
375 - console.log("提取金额的输入框事件");  
376 -  
377 -  
378 - console.log(val,"提取金额的输入框事件");  
379 - getApp().showWarning("提现需大于"+val+"元");  
380 -  
381 -  
382 - }  
383 - },  
384 - /**  
385 - * 生命周期函数--监听页面隐藏  
386 - */  
387 - onHide: function (event){  
388 -  
389 - },  
390 -  
391 - /**  
392 - * 生命周期函数--监听页面卸载  
393 - */  
394 - onUnload: function() {  
395 -  
396 - },  
397 -  
398 - /**  
399 - * 页面相关事件处理函数--监听用户下拉动作  
400 - */  
401 - onPullDownRefresh: function() {  
402 -  
403 - },  
404 -  
405 -  
406 -  
407 - /**  
408 - * 用户点击右上角分享  
409 - */  
410 - onShareAppMessage: function() {  
411 - getApp().globalData.no_clear=1;  
412 - }  
413 -})  
414 \ No newline at end of file 0 \ No newline at end of file
pages/user/member/bring/bring.json deleted
1 -{}  
2 \ No newline at end of file 0 \ No newline at end of file
pages/user/member/bring/bring.wxml deleted
1 -<wxs module="filter" src="../filter.wxs"></wxs>  
2 -<view class="big-rim">  
3 - <form bindsubmit='Gettime'>  
4 - <!-- 头部 -->  
5 - <view class="txyebk">  
6 - <view class="tou">  
7 - <view class="ktxye">可提现余额 </view>  
8 - <view class="ye">¥<text class="texts">{{filter.getNum(user_money)}}</text></view>  
9 - </view>  
10 - </view>  
11 - <!-- 提现金额的输入 -->  
12 - <view class="txjebk">  
13 - <view class="zhons">  
14 - <view class="txje">提现金额</view>  
15 - <view class="dd">  
16 - <view class="a">¥</view>  
17 - <view class="srk-rim">  
18 - <input name="moneys" type="digit" class="srk" value='{{val}}'  
19 - bindblur="defocus"placeholder-style="color: #df848f;" placeholder='请输入金额最少提现¥{{distribut_min}}' />  
20 - </view>  
21 - </view>  
22 - </view>  
23 - </view>  
24 -  
25 - <view class="list-rim">  
26 - <view class="xia">  
27 - <view class="one-list">请按要求正确填写,预计1-7个工作日到账</view>  
28 - <view class="two-list">  
29 - <view class="txfs">提现方式</view>  
30 - <view wx:if="{{is_closetxbank!=1}}" class="big-rim-one" bindtap="onClickItem" data-idx='1'>  
31 - <view class="rim-one" > <view class="ys {{current==1?'tab_item_active':''}}" ></view></view>  
32 - <view class="yhk">银行卡</view>  
33 - </view>  
34 - <view wx:if="{{is_tx_wx==1}}">  
35 - <view class="big-rim-two" bindtap="onClickItem" data-idx='2'>  
36 - <view class="rim-one" ><view class="ys {{current==2?'tab_item_active':''}}" ></view></view>  
37 - <view class="yhks">微信余额</view>  
38 - </view>  
39 - </view>  
40 - </view>  
41 - <view class="one-lists" hidden='{{current==2}}'>卡号  
42 - <input name="card" bindinput="bankinput" bindblur="blurInputEvent" class="srk-two"value="{{account_bank}}"placeholder='请输入银行卡账号' maxlength="23"> </input>  
43 - </view>  
44 - <view class="one-lists">姓名<input name="userName" class="srk-two" value='{{usernames}}' placeholder="{{current==2?'请输入微信的开户人姓名':'请输入银行卡的开户人姓名'}}"></input></view>  
45 - <view class="yh"hidden='{{current==2}}'>银行<text class="yhmz">{{bank_name}}</text></view>  
46 - </view>  
47 - </view>  
48 - <button class="{{button<needmon?'om':'botton'}}" data-usermoney="{{user_money}}" form-type="{{submit}}">{{user_money<needmon?"满"+needmon+"元才可提现":"申请提现"}}</button>  
49 - </form>  
50 -</view>  
51 -  
pages/user/member/bring/bring.wxss deleted
1 -/* 最大的框 */  
2 -.big-rim{  
3 - width: 100%;  
4 -  
5 -}  
6 -.tou{  
7 - width: 90%;  
8 - height: auto;  
9 - margin-left: -25rpx;  
10 - display: flex;  
11 -}  
12 -.zhons{  
13 - width: 99%;  
14 - height: auto;  
15 - margin-left: -25rpx;  
16 - }  
17 -.xia{  
18 - width: 90%;  
19 - height: auto;  
20 - margin-left: -25rpx;  
21 -}  
22 - /* 可提现余额的边框 */  
23 - .txyebk{  
24 - display: flex;  
25 - border-bottom:10px solid #eeeeee;  
26 - width: 100%;  
27 - height: 110rpx;  
28 - line-height: 110rpx;  
29 -  
30 -  
31 - }  
32 -  
33 -/* 可提现余额 */  
34 -.ktxye{  
35 -margin-left: 60rpx;  
36 - width: 130rpx;  
37 - height: 35rpx;  
38 - font-size: 25rpx;  
39 -}  
40 -/* 余额 */  
41 -.ye{  
42 - margin-left: 19rpx;  
43 - width:40rpx;  
44 - height: 35rpx;  
45 - color: #C4182E;  
46 - font-size: 27rpx;  
47 -}  
48 -.texts{  
49 -color: #C4182E;  
50 -font-size: 28rpx;  
51 -font-family: 'SimHei',Arial;  
52 - margin-left: 10rpx;  
53 - width: 170rpx;  
54 - height: 35rpx;  
55 -}  
56 -/* 提现金额的边框 */  
57 - .txjebk{  
58 - border-bottom:10px solid #eeeeee;  
59 - width: 100%;  
60 - height: 140rpx;  
61 - }  
62 -  
63 - /*银行名字*/  
64 - .yhmz{  
65 - width:500rpx;  
66 - height: 50rpx;  
67 - margin-left:50rpx;  
68 - color: #999;  
69 - font-size: 30rpx;  
70 - font-family: 'SimHei',Arial;  
71 - /* margin-top:-70rpx; */  
72 -  
73 -}  
74 - /* 提现金额 */  
75 - .txje{  
76 -margin-left: 60rpx;  
77 -margin-top:28rpx;  
78 - width: 140rpx;  
79 - height: 35rpx;  
80 - font-size: 25rpx;  
81 -}  
82 -.dd{  
83 - width: 100%;  
84 - height: 110rpx;  
85 - display: flex;  
86 - margin-top:-5rpx;  
87 -  
88 -}  
89 - .a{  
90 -  
91 - font-size: 30rpx;  
92 - margin-left: 60rpx;  
93 - margin-top: 24rpx;  
94 - height: 30rpx;  
95 - width: 30rpx;  
96 -  
97 - }  
98 - /* 输入框的边框 */  
99 - .srk-rim{  
100 - margin-top: 20rpx;  
101 - width:99%;  
102 - height:60rpx;  
103 - border-bottom: 1px solid #EEEEEE;  
104 - margin-left:-6rpx;  
105 -  
106 - }  
107 - /* 输入框 */  
108 - .srk{  
109 - width: 600rpx;  
110 - font-size: 28rpx;  
111 - margin-left: 20rpx;  
112 - font-family: "微软雅黑";  
113 - color: #C4182E;  
114 - }  
115 - /* 列表的大边框 */  
116 - .list-rim{  
117 - width: 100%;  
118 - height: auto;  
119 - border-bottom:10px solid #eeeeee;  
120 - }  
121 - /* 列表1 */  
122 - .one-list{  
123 - font-size: 25rpx;  
124 - width: 680rpx;  
125 - height: 110rpx;  
126 - color: #000000;  
127 - line-height: 130rpx;  
128 - margin-left: 60rpx;  
129 - border-bottom: 1px solid #EEEEEE;  
130 - }  
131 - /* 列表2 */  
132 - .two-list{  
133 - display: flex;  
134 - font-size: 30rpx;  
135 - width: 680rpx;  
136 - height:90rpx;  
137 - line-height: 90rpx;  
138 - margin-left: 60rpx;  
139 - border-bottom: 1px solid #EEEEEE;  
140 - }  
141 - /* 提现方式 */  
142 - .txfs{  
143 - width:100rpx;  
144 - display: inline-block;  
145 - font-size: 25rpx;  
146 - color: #000000;  
147 -  
148 - }  
149 -/* 单选框1的边框 */  
150 - .big-rim-one{  
151 - display: flex;  
152 - margin-top:14rpx;  
153 - /* margin-left:30rpx; */  
154 - width:180rpx;  
155 - height:40rpx;  
156 - line-height:44rpx;  
157 -  
158 -  
159 - }  
160 - /* 单选框1 */  
161 - .rim-one{  
162 - margin-left:18rpx;  
163 - display:inline-block;  
164 - margin-top:18rpx;  
165 - width: 25rpx;  
166 - height: 25rpx;  
167 - line-height: 35rpx;  
168 - border-radius: 50%;  
169 - border: 3rpx solid #C4182E;  
170 -  
171 - }  
172 - /* 选中样式 1*/  
173 - .ys{  
174 -  
175 -width:21rpx;  
176 -height:21rpx;  
177 -margin-left:4rpx;  
178 -margin-top: 4rpx;  
179 -background-color:#C4182E;  
180 -border-radius:25rpx; /* 图形的半径 */  
181 -display: none;  
182 - }  
183 - .ys.tab_item_active{  
184 - display: block;  
185 - }  
186 -  
187 -  
188 -  
189 -  
190 -  
191 -.yhk{  
192 -  
193 - margin-top: 20rpx;  
194 - margin-left: 20rpx;  
195 - display:inline-block;  
196 - font-size: 25rpx;  
197 - color: #3b639f;  
198 - width: 100rpx;  
199 - height: 100%;  
200 - line-height: 100%;  
201 -}  
202 -/* 单选框2的边框 */  
203 - .big-rim-two{  
204 - display: flex;  
205 - line-height:60rpx;  
206 - width:250rpx;  
207 - height:60rpx;  
208 - margin-top:14rpx;  
209 -  
210 - }  
211 -.yhks{  
212 -  
213 - margin-top: 19rpx;  
214 - margin-left: 21rpx;  
215 - display:inline-block;  
216 - font-size: 25rpx;  
217 - color: #3b639f;  
218 - width: 120rpx;  
219 - height: 100%;  
220 - line-height: 100%;  
221 -}  
222 -  
223 -  
224 -/* 列表1 */  
225 - .one-lists{  
226 - display: flex;  
227 - font-size: 25rpx;  
228 - width: 680rpx;  
229 - height: 90rpx;  
230 - color: #000000;  
231 - line-height: 90rpx;  
232 - margin-left: 60rpx;  
233 - border-bottom: 1px solid #EEEEEE;  
234 - }  
235 -  
236 - /* 输入框样式 */  
237 - .srk-two{  
238 - width: 200px;  
239 - height: 50rpx;  
240 - margin-left:50rpx;  
241 - margin-top:18rpx;  
242 - color: #999;  
243 - font-size: 25rpx;  
244 - font-family: 'SimHei',Arial;  
245 - }  
246 -/* 银行 */  
247 - .yh{  
248 - font-family: 'SimHei',Arial;  
249 - font-size: 25rpx;  
250 - width: 620rpx;  
251 - height:92rpx;  
252 - color: #000000;  
253 - line-height:70rpx;  
254 - margin-left: 60rpx;  
255 - display:flex;  
256 -  
257 -}  
258 -  
259 -  
260 -  
261 - /* 确认按钮 */  
262 - .botton{  
263 - margin-top:55rpx;  
264 - margin-left: 49rpx;  
265 - background-color: #C4182E;  
266 - width: 88%;  
267 - border-radius:10rpx;  
268 - text-align: center;  
269 - height: 80rpx;  
270 - line-height: 80rpx;  
271 - color: #FFF;  
272 - font-size: 14px;  
273 - border: none;  
274 - font-family: 'SimHei',Arial;  
275 -  
276 - }  
277 - .om{  
278 - margin-top:55rpx;  
279 - margin-left: 49rpx;  
280 - background: gainsboro;  
281 - width: 88%;  
282 - border-radius:10rpx;  
283 - text-align: center;  
284 - height:80rpx;  
285 - line-height: 80rpx;  
286 - color: #FFF;  
287 - font-size:27rpx;  
288 - border: none;  
289 - font-family: 'SimHei',Arial;  
290 -  
291 - }  
292 \ No newline at end of file 0 \ No newline at end of file
pages/user/member/bring/msg/msg.js deleted
1 -// pages/user/member/bring/msg/msg.js  
2 -var t = getApp(),o = t.globalData.setting,os = o;  
3 -Page({  
4 -  
5 - /**  
6 - * 页面的初始数据  
7 - */  
8 - data: {  
9 - iurl: o.imghost,  
10 - timer: '',//定时器名字  
11 - countDownNum: '3'//倒计时初始值  
12 - },  
13 -  
14 -  
15 - /**  
16 - * 生命周期函数--监听页面加载  
17 - */  
18 - onLoad: function (options) {  
19 -  
20 - },  
21 -  
22 - /**  
23 - * 生命周期函数--监听页面初次渲染完成  
24 - */  
25 - onReady: function () {  
26 -  
27 - },  
28 -  
29 - /**  
30 - * 生命周期函数--监听页面显示  
31 - */  
32 - onShow: function () {  
33 - getApp().check_can_share();  
34 - this.countDown();  
35 - },  
36 - countDown: function () {  
37 - let that = this;  
38 - let countDownNum = that.data.countDownNum;//获取倒计时初始值  
39 - //如果将定时器设置在外面,那么用户就看不到countDownNum的数值动态变化,所以要把定时器存进data里面  
40 - that.setData({  
41 - timer: setInterval(function () {//这里把setInterval赋值给变量名为timer的变量  
42 - //每隔一秒countDownNum就减一,实现同步  
43 - countDownNum--;  
44 - //然后把countDownNum存进data,好让用户知道时间在倒计着  
45 - that.setData({  
46 - countDownNum: countDownNum  
47 - })  
48 - //在倒计时还未到0时,这中间可以做其他的事情,按项目需求来  
49 - if (countDownNum == 0) {  
50 - //这里特别要注意,计时器是始终一直在走的,如果你的时间为0,那么就要关掉定时器!不然相当耗性能  
51 - //因为timer是存在data里面的,所以在关掉时,也要在data里取出后再关闭  
52 - clearInterval(that.data.timer);  
53 - //关闭定时器之后,可作其他处理codes go here  
54 - wx.navigateBack();//返回上一页  
55 - }  
56 - },1000)  
57 - })  
58 - },  
59 - click:function(){  
60 -  
61 - wx.redirectTo({  
62 - url: '../bring',  
63 - })  
64 - },  
65 - homepage:function(){  
66 -  
67 - wx.navigateTo({  
68 - url: "../../../index/index",  
69 - })  
70 - },  
71 -  
72 - /**  
73 - * 生命周期函数--监听页面隐藏  
74 - */  
75 - onHide: function () {  
76 -  
77 - },  
78 -  
79 - /**  
80 - * 生命周期函数--监听页面卸载  
81 - */  
82 - onUnload: function () {  
83 -  
84 - },  
85 -  
86 - /**  
87 - * 页面相关事件处理函数--监听用户下拉动作  
88 - */  
89 - onPullDownRefresh: function () {  
90 -  
91 - },  
92 -  
93 - /**  
94 - * 页面上拉触底事件的处理函数  
95 - */  
96 - onReachBottom: function () {  
97 -  
98 - },  
99 -  
100 - /**  
101 - * 用户点击右上角分享  
102 - */  
103 - onShareAppMessage: function () { getApp().globalData.no_clear=1  
104 -  
105 - }  
106 -})  
107 \ No newline at end of file 0 \ No newline at end of file
pages/user/member/bring/msg/msg.json deleted
1 -{  
2 - "usingComponents": {}  
3 -}  
4 \ No newline at end of file 0 \ No newline at end of file
pages/user/member/bring/msg/msg.wxml deleted
1 -<view class="rim">  
2 -<view class="font-one">系统提示</view>  
3 -<view class="img"><image class="imgs"src="{{iurl}}/miniapp/images/usermoney/icogantanhao.png"></image></view>  
4 -<view class="itme">已提交申请 等待时间:{{countDownNum}}</view>  
5 -<view class="click">  
6 -<view class="top" bindtap='click'>返回上一页</view>  
7 -<view class="hom-page"bindtap='homepage'>返回首页</view>  
8 -</view>  
9 -</view>  
pages/user/member/bring/msg/msg.wxss deleted
1 -/* 边框 */  
2 -.rim{  
3 - width: 100%;  
4 - height: auto;  
5 - text-align: center;  
6 -  
7 -}  
8 -/* 系统提示 */  
9 -.font-one{  
10 - width: 100%;  
11 - height: 60rpx;  
12 - padding-top: 30rpx;  
13 - font-family: 'SimHei',Arial;  
14 - font-size: 40rpx;  
15 - margin-left:20rpx;  
16 -  
17 -}  
18 -.imgs{  
19 - width:350rpx;  
20 - height:350rpx;  
21 - margin-top:20rpx;  
22 -}  
23 -/* 图片 */  
24 -.img{  
25 - width:400rpx;  
26 - height:400rpx;  
27 - margin: 40rpx 200rpx;  
28 - margin-right:60rpx;  
29 -  
30 -}  
31 -/* 倒计时 */  
32 -.itme{  
33 - margin-top: -40rpx;  
34 -  
35 - width: 100%;  
36 - height: 50rpx;  
37 - color: #999;  
38 - font-family: 'SimHei',Arial;  
39 - font-size: 35rpx;  
40 -}  
41 -/* 按钮的边框 */  
42 -.click{  
43 - display: flex;  
44 - width: 100%;  
45 - height: 80rpx;  
46 -}  
47 -/* 返回上一页 */  
48 -.top{  
49 - margin-top: 30rpx;  
50 - background: #c4182e;  
51 - color: #fff;  
52 - text-align: center;  
53 - width: 45%;  
54 - height: 60rpx;  
55 - line-height: 160%;  
56 - border-radius:5px;  
57 - margin-left: 20rpx;  
58 - font-size: 35rpx;  
59 -}  
60 -.hom-page{  
61 - margin-top: 30rpx;  
62 - font-size: 35rpx;  
63 - background: #c4182e;  
64 - color: #fff;  
65 - text-align: center;  
66 - width: 45%;  
67 - height:60rpx;  
68 - line-height: 160%;  
69 - border-radius:5px;  
70 - margin-left: 40rpx;  
71 -}  
72 -  
pages/user/member/cash_record/cash_record.js deleted
1 -var t = getApp(),  
2 - a = t.request,  
3 - o = t.globalData.setting,  
4 - os = o,  
5 - i = require("../../../../utils/util.js"),  
6 - ut = i,  
7 - s = require("../../../../utils/common.js");  
8 -var regeneratorRuntime = require('../../../../utils/runtime.js');  
9 -Page({  
10 - data: {  
11 - parameter: false,//控制有没有数据的时候  
12 - details: [],//数据  
13 - isBind: true,//控制清空时间日期的按钮  
14 - isBinds: true,  
15 - showModal: false, //弹框控制器  
16 - pageSize: 10,  
17 - page: 1,  
18 - datet: "",  
19 - dates: "",  
20 - current_page: 0,  
21 - is_no_more: 0,  
22 -  
23 - ordersn: "",  
24 - time: "",  
25 - status:"",  
26 - money:"",  
27 - accountname:"",  
28 - bankname:"",  
29 - accountbank:"",  
30 - },  
31 - //监听输入框显示清空按钮  
32 - watchPassWord: function (event) {  
33 - console.log("监听输入框显示清空按钮");  
34 - var val = event.detail.value;  
35 - console.log("是什么", val);  
36 - if (val != "" && val != null) {  
37 - var isBind = false;  
38 - this.setData({ isBind: isBind });  
39 -  
40 - }  
41 - },  
42 -  
43 - /**  
44 - * 生命周期函数--监听页面初次渲染完成  
45 - */  
46 - onReady: function () {  
47 -  
48 - },  
49 - //明细查询  
50 - Gettime: function (e) {  
51 - var page = 0;  
52 - //开始获取时间  
53 - var th = this;  
54 - var stime = th.data.datet;  
55 - var etime = th.data.dates;  
56 - console.log(stime, "数据绑定", etime)  
57 - // var formData = e.detail.value;  
58 - // var stime = formData.datat;  
59 - // var etime = formData.datas;  
60 - console.log(stime, "sss" + etime);  
61 - //开始获取时间结束  
62 - console.log(stime, "结束开始", etime);  
63 - //删除字符中的——  
64 - var datatk = stime.replace(/[-]/g, "");  
65 - console.log("aaa", datak);  
66 - var dataj = etime.replace(/[-]/g, "");  
67 - console.log("开始", datatk, "结束", dataj);  
68 - //转换类型  
69 - var datak = parseInt(datatk);  
70 - var dataj = parseInt(dataj);  
71 - console.log("sk", datak, "js", dataj);  
72 - //判断初始时间小于结束时间  
73 - if (datak > dataj) {  
74 - console.log("开始时间", datak, '结束时间', dataj, "时间判断");  
75 - getApp().showWarning("结束时间错误");  
76 - } else {  
77 - this.setData({details:[]});  
78 - console.log(datak, dataj, "时间判断2");  
79 - console.log("有进来吗", stime, etime);  
80 - this.setData({ current_page: 0 });  
81 - this.lsmx();  
82 - }  
83 -  
84 - },  
85 - //流水明细  
86 - async lsmx() {  
87 - //if (this.data.is_no_more) return;  
88 - this.data.current_page++;  
89 - var stime = this.data.datet;  
90 - var etime = this.data.dates;  
91 - var user_id = getApp().globalData.user_id;  
92 - var store_id = os.stoid;  
93 - var e = this,  
94 - details = "", parameter = "";  
95 - var get_data = {  
96 - user_id: user_id, store_id: store_id,  
97 - pageSize: 10, page: e.data.current_page  
98 - };  
99 -  
100 - if (etime != "" && etime != null) {  
101 - get_data.etime = etime;  
102 - }  
103 -  
104 - if (stime != "" && stime != null) {  
105 - get_data.stime = stime;  
106 - }  
107 - var big_arr = this.data.details;  
108 - //http://localhost:8082/api/index/mx/  
109 - await getApp().request.promiseGet("/api/weshop/users/pageCashreCord", {  
110 - data: get_data, isShowLoading: 1  
111 - }).then(res => {  
112 - var details = res.data;  
113 -  
114 - if (!details || !details.data || !details.data.pageData || details.data.pageData.length == 0) {  
115 - this.data.is_no_more = 1;  
116 - getApp().showWarning("未找更多数据");  
117 - return false;  
118 - }  
119 - var details = details.data.pageData;  
120 -  
121 - details.forEach(function (val, ind) {  
122 - big_arr.push(val);  
123 - })  
124 - setTimeout(() => {  
125 - this.setData({  
126 - details: big_arr  
127 - });  
128 - }, 1500)  
129 -  
130 -  
131 - })  
132 - },  
133 - /**  
134 - * 生命周期函数--监听页面加载  
135 - */  
136 - onLoad: function (options) {  
137 -  
138 -  
139 - },  
140 -  
141 - //---加载更多是靠这个函数----  
142 - // onReachBottom: function () {  
143 -  
144 - // this.lsmx();  
145 -  
146 - // },  
147 -  
148 -  
149 - //起始时间  
150 - bindDateChenge: function (e) {  
151 - console.log("是什么", e.detail.value);  
152 - var isBind = false;  
153 - this.setData({  
154 - datet: e.detail.value, isBind: isBind  
155 - });  
156 - },  
157 - // 结束时间  
158 - bindDateChenges: function (e) {  
159 - console.log("是什么", e.detail.value);  
160 - var isBinds = false;  
161 - this.setData({  
162 - dates: e.detail.value, isBinds: isBinds  
163 - });  
164 - },  
165 - //catchtap阻止冒泡,点击清除开始时间的按钮  
166 - eliminate: function () {  
167 - console.log("试试");  
168 - var isBind = true;  
169 - var data = "";  
170 - this.setData({ datet: data, isBind: isBind })  
171 - },  
172 - //catchtap阻止冒泡,点击清除结束时间的按钮  
173 - eliminates: function () {  
174 - console.log("试试");  
175 - var isBinds = true;  
176 - var dates ="";  
177 - this.setData({ dates: dates, isBinds: isBinds })  
178 - },  
179 - /**  
180 - * 生命周期函数--监听页面显示  
181 - */  
182 - onShow: function () {  
183 - this.lsmx();  
184 - wx.setNavigationBarTitle({  
185 - title: "提现记录",  
186 - })  
187 - },  
188 - // 关闭弹出框  
189 - close:function (e) {  
190 -  
191 - this.setData({  
192 - showModal: false  
193 - })  
194 -  
195 -  
196 - },  
197 - // 开启弹出框  
198 - submit:function (e) {  
199 - console.log("hhhhsssss",this.data.ordersn, this.data.time, this.data.money);  
200 - console.log("什么鬼" ,e.target.dataset)  
201 - var ordersn = e.currentTarget.dataset.ordersn;  
202 - var time = e.currentTarget.dataset.time;  
203 - var status = e.currentTarget.dataset.status;  
204 - var money = e.currentTarget.dataset.money;  
205 - var accountname = e.currentTarget.dataset.accountname;  
206 - var bankname = e.currentTarget.dataset.bankname;  
207 - var accountbank = e.currentTarget.dataset.accountbank;  
208 - console.log("点击获取的参数", ordersn, time, status, money, accountname, bankname, accountbank);  
209 - this.setData({  
210 - showModal: true,  
211 - ordersn: ordersn,  
212 - time: time,  
213 - status: status,  
214 - money: money,  
215 - accountname: accountname,  
216 - bankname: bankname,  
217 - accountbank: accountbank,  
218 - })  
219 -  
220 - },  
221 -})  
222 \ No newline at end of file 0 \ No newline at end of file
pages/user/member/cash_record/cash_record.json deleted
1 -{}  
2 \ No newline at end of file 0 \ No newline at end of file
pages/user/member/cash_record/cash_record.wxml deleted
1 -<wxs module="filter" src="../filter.wxs"></wxs>  
2 -<wxs module="dateUtil" src="index.wxs"></wxs>  
3 -<view class="eject-frame">  
4 -<view class="big-rim">  
5 - <form bindsubmit='Gettime'>  
6 - <view class="min-rim">  
7 - <view class="rq">日期:</view>  
8 - <picker mode="date" value='{{datet}}'start="2019/1/1" end=""  
9 - bindchange='bindDateChenge'>  
10 - <view calss="kspicker">  
11 - <view class='kssj'>  
12 - <text name="datat" class='kstext' value='{{datet}}'bindinput='watchPassWord' >{{datet}}</text></view>  
13 - <view class="empty"hidden='{{isBind}}'>  
14 - <button class="ksqc" catchtap="eliminate">x</button>  
15 - </view>  
16 - </view>  
17 - </picker>  
18 -  
19 - <view class="zi">至 </view>  
20 - <picker mode="date" value='{{dates}}' start="2019/1/1" end="" bindchange='bindDateChenges'>  
21 - <view class="jspicker">  
22 - <view class='jssj'>  
23 - <text name="datas" class='jstext' value='{{dates}}'>{{dates}}</text></view>  
24 - <view class="jspc"hidden="{{isBinds}}">  
25 - <button class="end" catchtap="eliminates">x</button>  
26 - </view>  
27 - </view>  
28 - </picker>  
29 - </view>  
30 - <button class="botton" form-type='submit'>明细查询</button>  
31 - </form>  
32 - <view class="zs">注: 读取时段内近10笔记录</view>  
33 -</view>  
34 -  
35 -<view wx:if="{{details.lenght==0}}">  
36 - <view class="mysj">没有数据</view>  
37 -</view>  
38 -<view wx:else>  
39 - <block wx:for="{{details}}"wx:for-index="idx" wx:for-item="detail">  
40 - <view class="data" bindtap="submit" data-ordersn="{{detail.order_sn}}"  
41 - data-time="{{dateUtil.dateFormat(detail.create_time)}}"data-status="{{detail.status}}"  
42 - data-money="{{detail.money}}" data-accountname="{{detail.account_name}}"  
43 - data-bankname="{{detail.bank_name}}"  
44 - data-accountbank="{{detail.account_bank}}" >  
45 -  
46 - <view class="left">  
47 - <view class='left-test'>  
48 - 提现  
49 - <view class='type'>  
50 - 状态:{{detail.status=="0"?"申请中":(detail.status=="1"?"申请成功":"申请失败")}} </view>  
51 - </view>  
52 - </view>  
53 - <view class="right-rim">  
54 - <view class="time">{{dateUtil.dateFormat(detail.create_time)}}</view>  
55 - <view class="money">  
56 - {{detail.status=="1"?'-':'-'}}{{filter.getNum(detail.money)}}</view>  
57 - </view>  
58 - </view>  
59 - </block>  
60 -  
61 -</view>  
62 -<!-- 蒙层 -->  
63 -  
64 - <view class="mask"bindtap="close" catchtouchmove="preventTouchMove" wx:if="{{showModal}}">  
65 - </view>  
66 - <!-- 弹出框 -->  
67 -  
68 - <view class="big-rims" bindtap="close" wx:if="{{showModal}}">  
69 - <view class="bk">  
70 - <view class="parameter-name"><view class="name">流水号</view><view class="parameter">{{ordersn}} </view></view>  
71 - <view class="parameter-name"><view class="name">类型</view><view class="parameter">提现</view></view>  
72 - <view class="parameter-name"><view class="name">支出</view><view class="parameter green">{{money}}</view></view>  
73 - <view class="parameter-name"><view class="name">时间</view><view class="parameter">{{time}}</view></view>  
74 - <view class="parameter-name"><view class="name">银行</view><view class="parameter">{{bankname}}</view></view>  
75 - <view class="parameter-name"><view class="name">银行卡号</view><view class="parameter">{{accountbank}}</view></view>  
76 - <view class="parameter-name"><view class="name">账户名称</view><view class="parameter">{{accountname}}</view></view>  
77 - <view class="parameter-name"><view class="name">状态</view><view class="parameter">  
78 - {{status=="0"?"申请中":(status=="1"?"申请成功":"申请失败")}}</view></view>  
79 -  
80 - </view>  
81 - </view>  
82 - </view>  
83 \ No newline at end of file 0 \ No newline at end of file
pages/user/member/cash_record/cash_record.wxss deleted
1 -/* 大边框 */  
2 -.big-rim{  
3 - margin-top: 15rpx;  
4 - width: 100%;  
5 - height: 270rpx;  
6 - border-bottom: 10px solid #EEEEEE;  
7 -}  
8 -.min-rim{  
9 -display: flex;  
10 -width: 100%;  
11 -height: auto;  
12 -}  
13 -/* 开始时间 */  
14 -.kssj{  
15 -border-radius: 5px;  
16 -background-color: #EEEEEE;  
17 -border: 1px solid #DADADA;  
18 -width:220rpx;  
19 -height: 50rpx;  
20 -margin-top:5rpx;  
21 -margin-left:10rpx;  
22 -line-height:40rpx;  
23 -  
24 -}  
25 -.kstext{  
26 -padding-bottom: 10rpx;  
27 -padding-left: 10rpx;  
28 -font-size: 25rpx;  
29 -color: #333;  
30 -font-family: 'SimHei',Arial;  
31 -}  
32 -/* 日期 */  
33 -.rq{  
34 - margin-top:15rpx;  
35 - font-size:30rpx;  
36 - font-family: 'SimHei',Arial;  
37 - margin-left:30rpx;  
38 -}  
39 -/* 开始时间 边框 */  
40 -.kspicker{  
41 - position: relative;  
42 - top:0rpx;  
43 - left: 0rpx;  
44 -}  
45 -/* 开始 */  
46 -.ksqc{  
47 - width: 25rpx;  
48 - height: 25rpx;  
49 - border-radius:50%;  
50 - background: #767676;  
51 - color: #fff;  
52 - font-size: 25rpx;  
53 - text-align: center;  
54 - line-height:19rpx;  
55 -  
56 -}  
57 -/* 至 */  
58 -.zi{  
59 - margin-top:15rpx;  
60 - font-size:30rpx;  
61 - font-family: 'SimHei',Arial;  
62 - margin-left:20rpx;  
63 -}  
64 -/* 结束时间边框 */  
65 -.jspicker{  
66 -position: relative;  
67 - top:0rpx;  
68 - left: 0rpx;  
69 - margin-left:20rpx;  
70 -  
71 -}  
72 -/* 结束时间 */  
73 -.jssj{  
74 -border-radius:5px;  
75 -background-color:#EEEEEE;  
76 -border:1px solid #DADADA;  
77 -width:220rpx;  
78 -height:50rpx;  
79 -margin-top:5rpx;  
80 -line-height:40rpx;  
81 -  
82 -}  
83 -.jstext{  
84 - padding-bottom: 10rpx;  
85 -padding-left: 10rpx;  
86 -font-size: 25rpx;  
87 -color: #333;  
88 -font-family: 'SimHei',Arial;  
89 -}  
90 -.jspc{  
91 - position:absolute;  
92 - top:7rpx;  
93 - left:192rpx;  
94 -}  
95 -/* 明细查询 */  
96 -.botton{  
97 - margin-left: 30rpx;  
98 - margin-top: 50rpx;  
99 - background-color: #C4182E;  
100 - width: 92%;  
101 - border-radius:10rpx;  
102 - text-align: center;  
103 - height: 77rpx;  
104 - line-height: 77rpx;  
105 - color: #FFF;  
106 - font-size: 28rpx;  
107 - border: none;  
108 - font-family: '微软雅黑';  
109 - }  
110 - /* 注释 */  
111 - .zs{  
112 - margin-left: 30rpx;  
113 - font-size: 25rpx;  
114 - color: #999999;  
115 - margin-top:30rpx;  
116 - font-family: 'SimHei',Arial;  
117 - }  
118 -.db{  
119 - display: flex;  
120 - width: 100%;  
121 - height: 100rpx;  
122 - border-bottom: 2rpx solid #e8e8e8;  
123 - line-height: 100rpx;  
124 -}  
125 -/* 项目 */  
126 -.xm{  
127 -margin-left: 30rpx;  
128 - height: 100rpx;  
129 - font-size: 35rpx;  
130 -color: #999999;  
131 -width: 50%;  
132 -vertical-align: middle;  
133 -  
134 -}  
135 -/* 金额 */  
136 -.je{  
137 - text-align: right;  
138 -padding-right:30rpx;  
139 - height: 100rpx;  
140 - font-size: 35rpx;  
141 -color: #999999;  
142 -width: 50%;  
143 -vertical-align: middle;  
144 -}  
145 -/* 没有数据 */  
146 -.mysj{  
147 - margin-top: 30rpx;  
148 - width: 100%;  
149 - height: 70rpx;  
150 - font-size: 34rpx;  
151 - text-align: center;  
152 - color: #888;  
153 -}  
154 -/*数据*/  
155 -.data{  
156 - display: flex;  
157 - width: 100%;  
158 - border-bottom: 1px solid #E8E8E8;  
159 - height: 120rpx;  
160 -}  
161 -/*左边的数据 */  
162 -.left{  
163 - width:50%;  
164 - height: 120rpx;  
165 -}  
166 -/* 单据单号 */  
167 -.left-test{  
168 - margin-left: 30rpx;  
169 - padding-top: 10rpx;  
170 - font-size: 30rpx;  
171 - color: #000000;  
172 - width: 100%;  
173 -}  
174 -/* 单据状态 */  
175 -.type{  
176 - margin-top: 10rpx;  
177 - font-size: 25rpx;  
178 - color: #999999;  
179 - width: 100%;  
180 -}  
181 -/* 单据时间 */  
182 -.time{  
183 - margin: 15rpx -17rpx;  
184 - width:280rpx;  
185 - font-size: 25rpx;  
186 - color: #999999;  
187 -  
188 - height: 30rpx;  
189 -}  
190 -/* 流动资金的加减 */  
191 -.money{  
192 -margin:20rpx;  
193 - height: 50rpx;  
194 - width: 120rpx;  
195 - margin-left:100rpx;  
196 - font-size: 30rpx;  
197 - font-family: 'SimHei',Arial;  
198 - text-align:right;  
199 -}  
200 -.right-rim{  
201 - margin-left: 110rpx;  
202 - width: 35%;  
203 - height: auto;  
204 -  
205 -}  
206 -/*开始时间清空输入框的按钮*/  
207 -.empty{  
208 - position: absolute;  
209 - top: 25rpx;  
210 - left:318rpx;  
211 -}  
212 -/*结束时间清空输入框的按钮*/  
213 -.end{  
214 - width: 25rpx;  
215 - height: 25rpx;  
216 - border-radius:50%;  
217 - background: #767676;  
218 - color: #fff;  
219 - font-size: 25rpx;  
220 - text-align: center;  
221 - line-height:19rpx;  
222 -  
223 -}  
224 -/* 弹出框的大边框 */  
225 -.big-rims{  
226 - width:90%;  
227 - height: 500rpx;  
228 - position: fixed;  
229 - z-index: 9999;  
230 - background-color: #fff;  
231 - border-radius: 10rpx;  
232 - flex-direction: column;  
233 - align-items: center;  
234 - left:40rpx;  
235 - top:280rpx;  
236 -  
237 -}  
238 -/* 蒙层 */  
239 - .mask{  
240 - width: 100%;  
241 - height: 100%;  
242 - position: fixed;  
243 - top: 0;  
244 - left: 0;  
245 - background: #000;  
246 - z-index: 9000;  
247 - opacity: 0.1;  
248 -}  
249 -.eject-frame{  
250 -width: 100%;  
251 - height: 100%;  
252 -margin: 0rpx auto;  
253 - line-height: 100%;  
254 -  
255 -}  
256 -/* 弹框参数名字 */  
257 -.parameter-name{  
258 - width: 121%;  
259 - height: 35rpx;  
260 - padding-left: 30rpx;  
261 - line-height:35rpx;  
262 -font-size:30rpx;  
263 -display: flex;  
264 -margin-top:25rpx;  
265 -font-family: 'SimHei',Arial;  
266 -}  
267 -/* 弹框参数 */  
268 -.parameter{  
269 - width: 40%;  
270 - height: 35rpx;  
271 - text-align:right;  
272 - line-height:35rpx;  
273 -font-size:30rpx;  
274 -font-family: 'SimHei',Arial;  
275 -margin-left:115rpx;  
276 -}  
277 -/* 参数名 */  
278 -.name{  
279 - width: 20%;  
280 - height: 35rpx;  
281 -  
282 -}  
283 -.green{  
284 - color: #006600;  
285 -}  
286 \ No newline at end of file 0 \ No newline at end of file
pages/user/member/cash_record/index.wxs deleted
1 -var formatNumber = function (n) {  
2 - n = n.toString()  
3 - return n[1] ? n : '0' + n  
4 -}  
5 -  
6 -var regYear = getRegExp("(y+)", "i");  
7 -  
8 -var dateFormat = function (timestamp, format) {  
9 - if (!format) {  
10 - format = "yyyy-MM-dd hh:mm:ss";  
11 - }  
12 - timestamp = parseInt(timestamp)*1000;;  
13 - var realDate = getDate(timestamp);  
14 - function timeFormat(num) {  
15 - return num < 10 ? '0' + num : num;  
16 - }  
17 - var date = [  
18 - ["M+", timeFormat(realDate.getMonth() + 1)],  
19 - ["d+", timeFormat(realDate.getDate())],  
20 - ["h+", timeFormat(realDate.getHours())],  
21 - ["m+", timeFormat(realDate.getMinutes())],  
22 - ["s+", timeFormat(realDate.getSeconds())],  
23 - ["q+", Math.floor((realDate.getMonth() + 3) / 3)],  
24 - ["S+", realDate.getMilliseconds()],  
25 - ];  
26 - var reg1 = regYear.exec(format);  
27 - // console.log(reg1[0]);  
28 - if (reg1) {  
29 -  
30 - format = format.replace(reg1[1], (realDate.getFullYear() + '').substring(4 - reg1[1].length));  
31 - }  
32 - for (var i = 0; i < date.length; i++) {  
33 - var k = date[i][0];  
34 - var v = date[i][1];  
35 -  
36 - var reg2 = getRegExp("(" + k + ")").exec(format);  
37 - if (reg2) {  
38 - format = format.replace(reg2[1], reg2[1].length == 1  
39 - ? v : ("00" + v).substring(("" + v).length));  
40 - }  
41 - }  
42 - return format;  
43 -}  
44 -  
45 -  
46 -module.exports = {  
47 - dateFormat: dateFormat  
48 -};  
49 -  
50 -  
51 -function parse(fmt) {  
52 -  
53 - var a = fmt.slice(0, 4);  
54 - console.log("a",a);  
55 - var b=+"-";  
56 - console.log("b", b);  
57 - var c = fmt.slice(5, 7);  
58 - var d=+"-";  
59 - console.log("d", d);  
60 - var e = fmt.slice(8, 9);  
61 - console.log("e", e);  
62 -  
63 -}  
64 \ No newline at end of file 0 \ No newline at end of file
pages/user/member/filter.wxs deleted
1 -var numFr = {  
2 - getNum: function(x) {  
3 - var f = parseFloat(x);  
4 - if (isNaN(f)) {  
5 - return false;  
6 - }  
7 - var f = Math.round(x * 100) / 100;  
8 - var s = f.toString();  
9 - var rs = s.indexOf('.');  
10 - if (rs < 0) {  
11 - rs = s.length;  
12 - s += '.';  
13 - }  
14 - while (s.length <= rs + 2) {  
15 - s += '0';  
16 - }  
17 - return s;  
18 - }  
19 -}  
20 -module.exports = {  
21 - getNum: numFr.getNum  
22 -}  
23 \ No newline at end of file 0 \ No newline at end of file
pages/user/member/menber.js deleted
1 -var e = function (e) {  
2 - return e && e.__esModule ? e : {  
3 - default: e  
4 - };  
5 -}(require("../../../utils/LoadMore.js")), t = getApp(), a = t.request, o = t.globalData.setting, os = o,  
6 - i = require("../../../utils/util.js"), ut = i, s = require("../../../utils/common.js"), n = new e.default();  
7 -var regeneratorRuntime = require('../../../utils/runtime.js');  
8 -Page({  
9 - /**  
10 - * 页面的初始数据  
11 - */  
12 - data: {  
13 - url: o.imghost,  
14 - user_money:0.00,  
15 - frozen_money:0.00,  
16 - iurl: o.imghost,  
17 - },  
18 -  
19 - /**  
20 - * 生命周期函数--监听页面显示  
21 - */  
22 - onShow: function () {  
23 - getApp().check_can_share();  
24 - var th=this;  
25 - //--先判断会员状态--  
26 - var user_info = getApp().globalData.userInfo;  
27 - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {  
28 - wx.navigateTo({ url: '/pages/togoin/togoin', })  
29 - return false;  
30 - }  
31 - this.init_fir();  
32 - wx.setNavigationBarTitle({  
33 - title: "余额",  
34 - })  
35 - //优惠券要实时更新  
36 - getApp().getConfig2(function(e) {  
37 - var json_d = JSON.parse(e.switch_list);  
38 -  
39 - th.data.is_closetxbank=json_d.is_closetxbank;  
40 - th.data.is_tx_wx=json_d.is_tx_wx;  
41 - },1)  
42 -  
43 - },  
44 - init_fir: function () {  
45 - this.myMoney(); //我的资产  
46 - },  
47 - //获取我的资产  
48 - async myMoney() {  
49 - var e = this, frozen_money, user_money;  
50 - var user_id = getApp().globalData.user_id;  
51 - var store_id = os.stoid;  
52 -  
53 - console.log(user_id, "是什么用户", store_id);  
54 - await getApp().request.promiseGet("/api/weshop/users/getMymoney/" +store_id+ "/" + user_id  
55 - , {  
56 - data: {}  
57 - }).then(res => {  
58 - console.log("1" + res);  
59 - var a = res.data.data;  
60 - var a = res.data.data;  
61 - frozen_money = a.unavailable;  
62 - console.log(a,"s1w" + a.frozen_money);  
63 - user_money = a.liudong_money;  
64 - console.log("menber" + a.user_money );  
65 - getApp().globalData.user_money = user_money;  
66 - console.log("menberssss" + user_money);  
67 - // 赋值getApp().globalData.can_use_money = 10;  
68 - // 取值var can = getApp().globalData.can_use_money;  
69 - })  
70 - this.setData({  
71 - frozen_money: frozen_money, user_money: user_money});  
72 - },  
73 -  
74 -  
75 -  
76 -  
77 -//提现记录  
78 - urls: function () {  
79 - wx.navigateTo({  
80 - url: 'cash_record/cash_record',  
81 - })  
82 - },  
83 - //不可用资金明细  
84 - url: function () {  
85 - wx.navigateTo({  
86 - url: 'account_unable/account_unable',  
87 - })  
88 - },  
89 - // 流动资金提现  
90 - jumPage:function(){  
91 -  
92 - //如果都关闭的情况下,不去提现  
93 - if(this.data.is_closetxbank && !this.data.is_tx_wx ){  
94 - wx.showToast({  
95 - title: "商家暂未开通提现功能,敬请期待!",  
96 - icon: 'none',  
97 - duration: 2000  
98 - })  
99 - return false;  
100 - }  
101 -  
102 - wx.navigateTo({  
103 - url: 'bring/bring',  
104 - })  
105 - },  
106 - //流动资金明细  
107 - jumPages: function () {  
108 - wx.navigateTo({  
109 - url: 'account/account',  
110 - })  
111 - },  
112 - /**  
113 - * 生命周期函数--监听页面加载  
114 - */  
115 - onLoad: function (options) {  
116 -  
117 - },  
118 -  
119 - /**  
120 - * 生命周期函数--监听页面初次渲染完成  
121 - */  
122 - onReady: function () {  
123 -  
124 - },  
125 -  
126 -  
127 - /**  
128 - * 生命周期函数--监听页面隐藏  
129 - */  
130 - onHide: function () {  
131 -  
132 - },  
133 -  
134 - /**  
135 - * 生命周期函数--监听页面卸载  
136 - */  
137 - onUnload: function () {  
138 -  
139 - },  
140 -  
141 - /**  
142 - * 页面相关事件处理函数--监听用户下拉动作  
143 - */  
144 - onPullDownRefresh: function () {  
145 -  
146 - },  
147 -  
148 - /**  
149 - * 页面上拉触底事件的处理函数  
150 - */  
151 - onReachBottom: function () {  
152 -  
153 - },  
154 -  
155 - /**  
156 - * 用户点击右上角分享  
157 - */  
158 - onShareAppMessage: function () { getApp().globalData.no_clear=1  
159 -  
160 - }  
161 -})  
162 \ No newline at end of file 0 \ No newline at end of file
pages/user/member/menber.json deleted
1 -{}  
2 \ No newline at end of file 0 \ No newline at end of file
pages/user/member/menber.wxml deleted
1 -<wxs module="filter" src="filter.wxs"></wxs>  
2 -<view>  
3 -<image class="pictuer" src='{{iurl}}/miniapp/images/usermoney/100.jpg'>  
4 -<view class="big">  
5 -<view class="font-one">总资产 (元)</view>  
6 -<view class="font-two">{{filter.getNum(user_money)}}</view>  
7 -  
8 -<view class='rim-neo'>  
9 -<view class="rim-two">  
10 -<view class="font-three">可提现 (元)</view>  
11 -<view class="font-five">{{filter.getNum(user_money)}}</view>  
12 -</view>  
13 -<view class="rim-three">  
14 -<view class="font-four">不可用 (元)</view>  
15 -<view class="font-five">{{filter.getNum(frozen_money)}}</view>  
16 -</view>  
17 -</view>  
18 -</view>  
19 -</image>  
20 -<view class="min-rim-one" type='primary' bindtap='jumPage'>  
21 -<image class="picture-two"src="{{iurl}}/miniapp/images/usermoney/one.png"></image>  
22 -<view class="ldzj-font">流动资金提现</view>  
23 -<image class="picture-three"src="{{iurl}}/miniapp/images/usermoney/left.png"></image>  
24 -</view>  
25 -  
26 -<view class="min-rim-one" type='primary' bindtap='jumPages'>  
27 -<image class="picture-two"src="{{iurl}}/miniapp/images/usermoney/detailed.png"></image>  
28 -<view class="ldzj-font">流动资金明细</view>  
29 -<image class="picture-three"src="{{iurl}}/miniapp/images/usermoney/left.png"></image>  
30 -</view>  
31 -  
32 -<view class="min-rim-one" type='primary' bindtap='url'>  
33 -<image class="picture-two"src="{{iurl}}/miniapp/images/usermoney/dodont.png"></image>  
34 -<view class="ldzj-font">不可用资金明细</view>  
35 -  
36 -<image class="picture-four"src="{{iurl}}/miniapp/images/usermoney/left.png"></image>  
37 -</view>  
38 -  
39 -<view class="min-rim-one" type='primary' bindtap='urls'>  
40 -<image class="picture-two"src="{{iurl}}/miniapp/images/usermoney/card.png"></image>  
41 -<view class="ldzj-font">提现记录</view>  
42 -<image class="picture-five"src="{{iurl}}/miniapp/images/usermoney/left.png"></image>  
43 -</view>  
44 -  
45 -</view>  
46 \ No newline at end of file 0 \ No newline at end of file
pages/user/member/menber.wxss deleted
1 -/* 图片 */  
2 -.pictuer{  
3 - width: 100%;  
4 - height: 325rpx;  
5 -}  
6 -/* 资产的大边框 */  
7 -.big{  
8 - color: #FFFFFF;  
9 - position: absolute;  
10 - top: 20rpx;  
11 - left: 45rpx;  
12 - width: 665rpx;  
13 - height: 280rpx;  
14 -}  
15 -/* 总资产 */  
16 -.font-one{  
17 -font-size:28rpx;  
18 -text-align: left;  
19 -height: 55rpx;  
20 -line-height:55rpx;  
21 -margin:6rpx;  
22 -}  
23 -/* 资产金额 */  
24 -.font-two{  
25 - font-size: 45rpx;  
26 - font-family: 'SimHei',Arial;  
27 - margin:-10rpx 5rpx;  
28 -  
29 -}  
30 -/*可提现和不可提现的边框 */  
31 -.rim-neo{  
32 - width: 100%;  
33 - display: flex;  
34 - margin-top:67rpx;  
35 - height:120rpx;  
36 -}  
37 -/*不可提现的边框 */  
38 -.rim-two{  
39 -width: 50%;  
40 - height:120rpx;  
41 - display:inline-block;  
42 -  
43 -}  
44 -  
45 -/* 可提现 */  
46 -.font-three{  
47 - color: #ff9998;  
48 - font-size:25rpx;  
49 - text-align: left;  
50 - height: 50rpx;  
51 - line-height:50rpx;  
52 - display:inline-block;  
53 - width:150rpx;  
54 -  
55 -}  
56 -/* 可提现和金额的小边框 */  
57 -.rim-three{  
58 - width: 50%;  
59 - height: 120rpx;  
60 - display:inline-block;  
61 -}  
62 -  
63 -/*不可用 */  
64 -.font-four{  
65 - width: 100%;  
66 - display:inline-block;  
67 - color: #ff9998;  
68 - font-size:25rpx;  
69 - height:50rpx;  
70 -line-height:50rpx;  
71 - text-align: left;  
72 - font-family: 'SimHei',Arial;  
73 -  
74 -}  
75 -/* 可提现和不可提现的金额 */  
76 -.font-five{  
77 - font-size:45rpx;  
78 - font-family:'SimHei',Arial;  
79 -}  
80 -/* 流动资金的边框 */  
81 -.min-rim-one{  
82 - display: flex;  
83 - width: 100%;  
84 - height:90rpx;  
85 - line-height: 90rpx;  
86 - border-bottom: 1px solid #EEEEEE;  
87 -}  
88 -/* 流动资金的小图片 */  
89 -.picture-two{  
90 - margin-top:33rpx;  
91 - width: 40rpx;  
92 - height: 30rpx;  
93 - margin-left: 20rpx;  
94 -}  
95 -/* 流动资金 */  
96 -.ldzj-font{  
97 - margin-left: 20rpx;  
98 - font-size:25rpx;  
99 - width:200rpx;  
100 -  
101 -}  
102 -.picture-three{  
103 - margin-top:32rpx;  
104 - margin-left: 420rpx;  
105 - height: 30rpx;  
106 - width: 20rpx;  
107 -}  
108 -.picture-four{  
109 - margin-top:32rpx;  
110 - margin-left: 420rpx;  
111 - height: 30rpx;  
112 - width: 20rpx;  
113 -}  
114 -.picture-five{  
115 - margin-top:32rpx;  
116 - margin-left: 420rpx;  
117 - height: 30rpx;  
118 - width: 20rpx;  
119 -}  
pages/user/my_service/i_service.wxml
@@ -39,7 +39,8 @@ @@ -39,7 +39,8 @@
39 39
40 <view class="flex-center fs24 itemCount"> 40 <view class="flex-center fs24 itemCount">
41 <view>剩余次数:</view> 41 <view>剩余次数:</view>
42 - <view>{{item.ObtainTimes}}</view> 42 + <view wx:if="{{item.DisplayQty==true || DisplayQty==1}}">无限次</view>
  43 + <view wx:else>{{item.ObtainTimes}}</view>
43 </view> 44 </view>
44 45
45 <view class="flex-center fs24 itemEffective"> 46 <view class="flex-center fs24 itemEffective">