|
|
@@ -178,6 +178,206 @@ class User extends BaseController
|
|
178
|
178
|
return app('json')->success($data);
|
|
179
|
179
|
}
|
|
180
|
180
|
|
|
|
181
|
+ //红包
|
|
|
182
|
+ public function hongbao_info(){
|
|
|
183
|
+ log::info("============hongbao");
|
|
|
184
|
+ $user = $this->request->userInfo();
|
|
|
185
|
+ if($user->uid>0){
|
|
|
186
|
+ //已经入账红包
|
|
|
187
|
+ $data['total_source']=$user->hongbao;
|
|
|
188
|
+ //为生效红包
|
|
|
189
|
+ $data['no_total_source']=Db::name('user_sign_hongbao')->where('status', -1)->where('uid', $user->uid)->sum('number');;
|
|
|
190
|
+ log::info("====spread_info_yhc=={$data['total_source']}======={$data['no_total_source']}");
|
|
|
191
|
+ return app('json')->success($data);
|
|
|
192
|
+
|
|
|
193
|
+ }
|
|
|
194
|
+
|
|
|
195
|
+ }
|
|
|
196
|
+ public function hongbao_list(){
|
|
|
197
|
+ $pm = $this->request->param('pm');
|
|
|
198
|
+
|
|
|
199
|
+ [$page, $limit] = $this->getPage();
|
|
|
200
|
+ $uid = $this->request->uid();
|
|
|
201
|
+ log::info("hongbao_list==={$uid}");
|
|
|
202
|
+ $where['uid'] = $uid;
|
|
|
203
|
+
|
|
|
204
|
+ if ($pm==0){
|
|
|
205
|
+
|
|
|
206
|
+ $data = DB::name('user_sign_hongbao')->where($where)->where('pm', 1)->field('id,mark,number,pm,addtime,order_id')->page($page, $limit)->order("id desc")->select();
|
|
|
207
|
+ }
|
|
|
208
|
+ if($pm==1){
|
|
|
209
|
+ $data = DB::name('user_sign_hongbao')->where($where)->where('pm', 2)->field('id,mark,number,pm,addtime,order_id')->page($page, $limit)->order("id desc")->select();
|
|
|
210
|
+
|
|
|
211
|
+ }
|
|
|
212
|
+ if($pm==2){
|
|
|
213
|
+ $data = DB::name('user_sign_hongbao')->where($where)->where('status', -1)->field('id,mark,number,pm,addtime,order_id')->page($page, $limit)->order("id desc")->select();
|
|
|
214
|
+
|
|
|
215
|
+ }
|
|
|
216
|
+ log::info("=======date==={$data}");
|
|
|
217
|
+ return app("json")->success($data);
|
|
|
218
|
+ }
|
|
|
219
|
+ //贡献值
|
|
|
220
|
+
|
|
|
221
|
+ public function gongxian_info(){
|
|
|
222
|
+ log::info("============hongbao");
|
|
|
223
|
+ $user = $this->request->userInfo();
|
|
|
224
|
+ if($user->uid>0){
|
|
|
225
|
+ //已经入账贡献值
|
|
|
226
|
+ $data['total_source']=$user->gongxian;
|
|
|
227
|
+ //为生贡献值
|
|
|
228
|
+ $data['no_total_source']=Db::name('user_sign_gongxian')->where('status', -1)->where('uid', $user->uid)->sum('number');;
|
|
|
229
|
+ log::info("====spread_info_yhc=={$data['total_source']}======={$data['no_total_source']}");
|
|
|
230
|
+ return app('json')->success($data);
|
|
|
231
|
+
|
|
|
232
|
+ }
|
|
|
233
|
+
|
|
|
234
|
+ }
|
|
|
235
|
+ public function gongxian_list(){
|
|
|
236
|
+ $pm = $this->request->param('pm');
|
|
|
237
|
+
|
|
|
238
|
+ [$page, $limit] = $this->getPage();
|
|
|
239
|
+ $uid = $this->request->uid();
|
|
|
240
|
+ log::info("green_integral_list==={$uid}");
|
|
|
241
|
+ $where['uid'] = $uid;
|
|
|
242
|
+
|
|
|
243
|
+ if ($pm==0){
|
|
|
244
|
+
|
|
|
245
|
+ $data = DB::name('user_sign_gongxian')->where($where)->where('pm', 1)->field('id,mark,number,pm,addtime,order_id')->page($page, $limit)->order("id desc")->select();
|
|
|
246
|
+ }
|
|
|
247
|
+ if($pm==1){
|
|
|
248
|
+ $data = DB::name('user_sign_gongxian')->where($where)->where('pm', 2)->field('id,mark,number,pm,addtime,order_id')->page($page, $limit)->order("id desc")->select();
|
|
|
249
|
+
|
|
|
250
|
+ }
|
|
|
251
|
+ if($pm==2){
|
|
|
252
|
+ $data = DB::name('user_sign_gongxian')->where($where)->where('status', -1)->field('id,mark,number,pm,addtime,order_id')->page($page, $limit)->order("id desc")->select();
|
|
|
253
|
+
|
|
|
254
|
+ }
|
|
|
255
|
+ log::info("=======date==={$data}");
|
|
|
256
|
+ return app("json")->success($data);
|
|
|
257
|
+ }
|
|
|
258
|
+
|
|
|
259
|
+ //京豆
|
|
|
260
|
+
|
|
|
261
|
+ public function jingdou_info(){
|
|
|
262
|
+ log::info("============hongbao");
|
|
|
263
|
+ $user = $this->request->userInfo();
|
|
|
264
|
+ if($user->uid>0){
|
|
|
265
|
+ //已经入账京豆
|
|
|
266
|
+ $data['total_source']=$user->jingdou;
|
|
|
267
|
+ //为生效京豆
|
|
|
268
|
+ $data['no_total_source']=Db::name('user_sign_jingdou')->where('status', -1)->where('uid', $user->uid)->sum('number');;
|
|
|
269
|
+ log::info("====spread_info_yhc=={$data['total_source']}======={$data['no_total_source']}");
|
|
|
270
|
+ return app('json')->success($data);
|
|
|
271
|
+
|
|
|
272
|
+ }
|
|
|
273
|
+
|
|
|
274
|
+ }
|
|
|
275
|
+ public function jingdou_list(){
|
|
|
276
|
+ $pm = $this->request->param('pm');
|
|
|
277
|
+
|
|
|
278
|
+ [$page, $limit] = $this->getPage();
|
|
|
279
|
+ $uid = $this->request->uid();
|
|
|
280
|
+ log::info("jingdou_list==={$uid}");
|
|
|
281
|
+ $where['uid'] = $uid;
|
|
|
282
|
+
|
|
|
283
|
+ if ($pm==0){
|
|
|
284
|
+
|
|
|
285
|
+ $data = DB::name('user_sign_jingdou')->where($where)->where('pm', 1)->field('id,mark,number,pm,addtime,order_id')->page($page, $limit)->order("id desc")->select();
|
|
|
286
|
+ }
|
|
|
287
|
+ if($pm==1){
|
|
|
288
|
+ $data = DB::name('user_sign_jingdou')->where($where)->where('pm', 2)->field('id,mark,number,pm,addtime,order_id')->page($page, $limit)->order("id desc")->select();
|
|
|
289
|
+
|
|
|
290
|
+ }
|
|
|
291
|
+ if($pm==2){
|
|
|
292
|
+ $data = DB::name('user_sign_jingdou')->where($where)->where('status', -1)->field('id,mark,number,pm,addtime,order_id')->page($page, $limit)->order("id desc")->select();
|
|
|
293
|
+
|
|
|
294
|
+ }
|
|
|
295
|
+ log::info("=======date==={$data}");
|
|
|
296
|
+ return app("json")->success($data);
|
|
|
297
|
+ }
|
|
|
298
|
+
|
|
|
299
|
+ //复购金
|
|
|
300
|
+
|
|
|
301
|
+ public function fugou_info(){
|
|
|
302
|
+ log::info("============fugou");
|
|
|
303
|
+ $user = $this->request->userInfo();
|
|
|
304
|
+ if($user->uid>0){
|
|
|
305
|
+ //已经入账京豆
|
|
|
306
|
+ $data['total_source']=$user->fugou;
|
|
|
307
|
+ //为生效京豆
|
|
|
308
|
+ $data['no_total_source']=Db::name('user_sign_fugou')->where('status', -1)->where('uid', $user->uid)->sum('number');;
|
|
|
309
|
+ log::info("====spread_info_yhc=={$data['total_source']}======={$data['no_total_source']}");
|
|
|
310
|
+ return app('json')->success($data);
|
|
|
311
|
+
|
|
|
312
|
+ }
|
|
|
313
|
+
|
|
|
314
|
+ }
|
|
|
315
|
+ public function fugou_list(){
|
|
|
316
|
+ $pm = $this->request->param('pm');
|
|
|
317
|
+
|
|
|
318
|
+ [$page, $limit] = $this->getPage();
|
|
|
319
|
+ $uid = $this->request->uid();
|
|
|
320
|
+ log::info("fugou_list==={$uid}");
|
|
|
321
|
+ $where['uid'] = $uid;
|
|
|
322
|
+
|
|
|
323
|
+ if ($pm==0){
|
|
|
324
|
+
|
|
|
325
|
+ $data = DB::name('user_sign_fugou')->where($where)->where('pm', 1)->field('id,mark,number,pm,addtime,order_id')->page($page, $limit)->order("id desc")->select();
|
|
|
326
|
+ }
|
|
|
327
|
+ if($pm==1){
|
|
|
328
|
+ $data = DB::name('user_sign_fugou')->where($where)->where('pm', 2)->field('id,mark,number,pm,addtime,order_id')->page($page, $limit)->order("id desc")->select();
|
|
|
329
|
+
|
|
|
330
|
+ }
|
|
|
331
|
+ if($pm==2){
|
|
|
332
|
+ $data = DB::name('user_sign_fugou')->where($where)->where('status', -1)->field('id,mark,number,pm,addtime,order_id')->page($page, $limit)->order("id desc")->select();
|
|
|
333
|
+
|
|
|
334
|
+ }
|
|
|
335
|
+ log::info("=======date==={$data}");
|
|
|
336
|
+ return app("json")->success($data);
|
|
|
337
|
+ }
|
|
|
338
|
+
|
|
|
339
|
+
|
|
|
340
|
+ //VR 购物金
|
|
|
341
|
+ public function vr_info(){
|
|
|
342
|
+ log::info("============vr");
|
|
|
343
|
+ $user = $this->request->userInfo();
|
|
|
344
|
+ if($user->uid>0){
|
|
|
345
|
+ //已经入账京豆
|
|
|
346
|
+ $data['total_source']=$user->vr;
|
|
|
347
|
+ //为生效京豆
|
|
|
348
|
+ $data['no_total_source']=Db::name('user_sign_vr')->where('status', -1)->where('uid', $user->uid)->sum('number');;
|
|
|
349
|
+ log::info("====spread_info_yhc=={$data['total_source']}======={$data['no_total_source']}");
|
|
|
350
|
+ return app('json')->success($data);
|
|
|
351
|
+
|
|
|
352
|
+ }
|
|
|
353
|
+
|
|
|
354
|
+ }
|
|
|
355
|
+
|
|
|
356
|
+ public function vr_list(){
|
|
|
357
|
+ $pm = $this->request->param('pm');
|
|
|
358
|
+
|
|
|
359
|
+ [$page, $limit] = $this->getPage();
|
|
|
360
|
+ $uid = $this->request->uid();
|
|
|
361
|
+ log::info("vr_list==={$uid}");
|
|
|
362
|
+ $where['uid'] = $uid;
|
|
|
363
|
+
|
|
|
364
|
+ if ($pm==0){
|
|
|
365
|
+
|
|
|
366
|
+ $data = DB::name('user_sign_vr')->where($where)->where('pm', 1)->field('id,mark,number,pm,addtime,order_id')->page($page, $limit)->order("id desc")->select();
|
|
|
367
|
+ }
|
|
|
368
|
+ if($pm==1){
|
|
|
369
|
+ $data = DB::name('user_sign_vr')->where($where)->where('pm', 2)->field('id,mark,number,pm,addtime,order_id')->page($page, $limit)->order("id desc")->select();
|
|
|
370
|
+
|
|
|
371
|
+ }
|
|
|
372
|
+ if($pm==2){
|
|
|
373
|
+ $data = DB::name('user_sign_vr')->where($where)->where('status', -1)->field('id,mark,number,pm,addtime,order_id')->page($page, $limit)->order("id desc")->select();
|
|
|
374
|
+
|
|
|
375
|
+ }
|
|
|
376
|
+ log::info("=======date==={$data}");
|
|
|
377
|
+ return app("json")->success($data);
|
|
|
378
|
+ }
|
|
|
379
|
+
|
|
|
380
|
+
|
|
181
|
381
|
public function spread_info_yhc()
|
|
182
|
382
|
{
|
|
183
|
383
|
log::info("============ddddddddd");
|