|
@@ -206,12 +206,12 @@ class UserBillController
|
|
|
array(
|
|
|
'url' => $urlCode, //二维码资源
|
|
|
'stream' => 0,
|
|
|
- 'left' => 114,
|
|
|
- 'top' => 790,
|
|
|
+ 'left' => 225,
|
|
|
+ 'top' => 913,
|
|
|
'right' => 0,
|
|
|
'bottom' => 0,
|
|
|
- 'width' => 120,
|
|
|
- 'height' => 120,
|
|
|
+ 'width' => 300,
|
|
|
+ 'height' => 300,
|
|
|
'opacity' => 100
|
|
|
)
|
|
|
),
|
|
@@ -258,24 +258,16 @@ class UserBillController
|
|
|
SystemAttachment::where(['name' => $name])->delete();
|
|
|
}
|
|
|
if (!$imageInfo) {
|
|
|
- try {
|
|
|
- $qr_code = QrcodeService::getForeverQrcode('spread', $user['uid']);
|
|
|
- if (isset($qr_code['url'])) {
|
|
|
- $urlCode = $qr_code['url'];
|
|
|
- } else {
|
|
|
- $codeUrl = set_http_type($siteUrl . '?spread=' . $user['uid'], 1);//二维码链接
|
|
|
- $imageInfo = UtilService::getQRCodePath($codeUrl, $name);
|
|
|
- if (is_string($imageInfo)) return app('json')->fail('二维码生成失败', ['error' => $imageInfo]);
|
|
|
- SystemAttachment::attachmentAdd($imageInfo['name'], $imageInfo['size'], $imageInfo['type'], $imageInfo['dir'], $imageInfo['thumb_path'], 1, $imageInfo['image_type'], $imageInfo['time'], 2);
|
|
|
- $urlCode = $imageInfo['dir'];
|
|
|
- }
|
|
|
- } catch (\Exception $e) {
|
|
|
- $codeUrl = set_http_type($siteUrl . '?spread=' . $user['uid'], 1);//二维码链接
|
|
|
- $imageInfo = UtilService::getQRCodePath($codeUrl, $name);
|
|
|
- if (is_string($imageInfo)) return app('json')->fail('二维码生成失败', ['error' => $imageInfo]);
|
|
|
- SystemAttachment::attachmentAdd($imageInfo['name'], $imageInfo['size'], $imageInfo['type'], $imageInfo['dir'], $imageInfo['thumb_path'], 1, $imageInfo['image_type'], $imageInfo['time'], 2);
|
|
|
- $urlCode = $imageInfo['dir'];
|
|
|
- }
|
|
|
+// $qr_code = QrcodeService::getForeverQrcode('spread', $user['uid']);
|
|
|
+// if (isset($qr_code['url'])) {
|
|
|
+// $urlCode = $qr_code['url'];
|
|
|
+// } else {
|
|
|
+ $codeUrl = set_http_type($siteUrl . '/register?spread=' . $user['uid'], 1);//二维码链接
|
|
|
+ $imageInfo = UtilService::getQRCodePath($codeUrl, $name);
|
|
|
+ if (is_string($imageInfo)) return app('json')->fail('二维码生成失败', ['error' => $imageInfo]);
|
|
|
+ SystemAttachment::attachmentAdd($imageInfo['name'], $imageInfo['size'], $imageInfo['type'], $imageInfo['dir'], $imageInfo['thumb_path'], 1, $imageInfo['image_type'], $imageInfo['time'], 2);
|
|
|
+ $urlCode = $imageInfo['dir'];
|
|
|
+// }
|
|
|
} else $urlCode = $imageInfo['att_dir'];
|
|
|
if ($imageInfo['image_type'] == 1) $urlCode = $siteUrl . $urlCode;
|
|
|
$siteUrl = set_http_type($siteUrl, 1);
|
|
@@ -292,12 +284,12 @@ class UserBillController
|
|
|
array(
|
|
|
'url' => $urlCode, //二维码资源
|
|
|
'stream' => 0,
|
|
|
- 'left' => 114,
|
|
|
- 'top' => 790,
|
|
|
+ 'left' => 225,
|
|
|
+ 'top' => 913,
|
|
|
'right' => 0,
|
|
|
'bottom' => 0,
|
|
|
- 'width' => 120,
|
|
|
- 'height' => 120,
|
|
|
+ 'width' => 300,
|
|
|
+ 'height' => 300,
|
|
|
'opacity' => 100
|
|
|
)
|
|
|
),
|
|
@@ -360,53 +352,87 @@ class UserBillController
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 动态积分记录
|
|
|
+ * 白积分记录
|
|
|
+ * @param Request $request
|
|
|
+ * @return mixed
|
|
|
+ * @throws \think\db\exception\DataNotFoundException
|
|
|
+ * @throws \think\db\exception\ModelNotFoundException
|
|
|
+ * @throws \think\exception\DbException
|
|
|
+ */
|
|
|
+ public function white_integral(Request $request)
|
|
|
+ {
|
|
|
+ list($page, $limit, $status) = UtilService::getMore([
|
|
|
+ ['page', 0], ['limit', 0], ['pm', 0]
|
|
|
+ ], $request, true);
|
|
|
+ return app('json')->successful(UserBill::userBillList($request->uid(), $page, $limit, 'white_integral', ['pm' => $status]));
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 紫积分记录
|
|
|
+ * @param Request $request
|
|
|
+ * @return mixed
|
|
|
+ * @throws \think\db\exception\DataNotFoundException
|
|
|
+ * @throws \think\db\exception\ModelNotFoundException
|
|
|
+ * @throws \think\exception\DbException
|
|
|
+ */
|
|
|
+ public function purple_integral(Request $request)
|
|
|
+ {
|
|
|
+ list($page, $limit, $status) = UtilService::getMore([
|
|
|
+ ['page', 0], ['limit', 0], ['pm', 0]
|
|
|
+ ], $request, true);
|
|
|
+ return app('json')->successful(UserBill::userBillList($request->uid(), $page, $limit, 'purple_integral', ['pm' => $status]));
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 绿积分记录
|
|
|
* @param Request $request
|
|
|
* @return mixed
|
|
|
* @throws \think\db\exception\DataNotFoundException
|
|
|
* @throws \think\db\exception\ModelNotFoundException
|
|
|
* @throws \think\exception\DbException
|
|
|
*/
|
|
|
- public function dynamic_integral_list(Request $request)
|
|
|
+ public function green_integral(Request $request)
|
|
|
{
|
|
|
list($page, $limit, $status) = UtilService::getMore([
|
|
|
['page', 0], ['limit', 0], ['pm', 0]
|
|
|
], $request, true);
|
|
|
- return app('json')->successful(UserBill::userBillList($request->uid(), $page, $limit, 'dynamic_integral', ['pm' => $status]));
|
|
|
+ return app('json')->successful(UserBill::userBillList($request->uid(), $page, $limit, 'green_integral', ['pm' => $status]));
|
|
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 消费券记录
|
|
|
+ * 商家积分记录
|
|
|
* @param Request $request
|
|
|
* @return mixed
|
|
|
* @throws \think\db\exception\DataNotFoundException
|
|
|
* @throws \think\db\exception\ModelNotFoundException
|
|
|
* @throws \think\exception\DbException
|
|
|
*/
|
|
|
- public function consumption_list(Request $request)
|
|
|
+ public function business_integral(Request $request)
|
|
|
{
|
|
|
list($page, $limit, $status) = UtilService::getMore([
|
|
|
['page', 0], ['limit', 0], ['pm', 0]
|
|
|
], $request, true);
|
|
|
- return app('json')->successful(UserBill::userBillList($request->uid(), $page, $limit, 'consumption', ['pm' => $status]));
|
|
|
+ return app('json')->successful(UserBill::userBillList($request->uid(), $page, $limit, 'business_integral', ['pm' => $status]));
|
|
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 贡献值记录
|
|
|
+ * 文票记录
|
|
|
* @param Request $request
|
|
|
* @return mixed
|
|
|
* @throws \think\db\exception\DataNotFoundException
|
|
|
* @throws \think\db\exception\ModelNotFoundException
|
|
|
* @throws \think\exception\DbException
|
|
|
*/
|
|
|
- public function contribution_list(Request $request)
|
|
|
+ public function paper_ticket(Request $request)
|
|
|
{
|
|
|
list($page, $limit, $status) = UtilService::getMore([
|
|
|
['page', 0], ['limit', 0], ['pm', 0]
|
|
|
], $request, true);
|
|
|
- return app('json')->successful(UserBill::userBillList($request->uid(), $page, $limit, 'contribution', ['pm' => $status]));
|
|
|
+ return app('json')->successful(UserBill::userBillList($request->uid(), $page, $limit, 'paper_ticket', ['pm' => $status]));
|
|
|
|
|
|
}
|
|
|
}
|