|
@@ -586,9 +586,10 @@ class DetailModel |
|
@@ -586,9 +586,10 @@ class DetailModel |
586
|
*
|
586
|
*
|
587
|
* @param int $uid 用户ID
|
587
|
* @param int $uid 用户ID
|
588
|
* @param int $id 咨询ID
|
588
|
* @param int $id 咨询ID
|
|
|
589
|
+ * @param int $productId 商品ID
|
589
|
* @return array
|
590
|
* @return array
|
590
|
*/
|
591
|
*/
|
591
|
- public static function upvoteConsult($uid, $id)
|
592
|
+ public static function upvoteConsult($uid, $id, $productId)
|
592
|
{
|
593
|
{
|
593
|
$result = array('code' => 400, 'message' => '出错啦~');
|
594
|
$result = array('code' => 400, 'message' => '出错啦~');
|
594
|
|
595
|
|
|
@@ -598,6 +599,7 @@ class DetailModel |
|
@@ -598,6 +599,7 @@ class DetailModel |
598
|
if (empty($uid)) {
|
599
|
if (empty($uid)) {
|
599
|
$result['code'] = 401;
|
600
|
$result['code'] = 401;
|
600
|
$result['message'] = '用户id为空';
|
601
|
$result['message'] = '用户id为空';
|
|
|
602
|
+ $result['data'] = Helpers::url('/signin.html', array('refer' => Helpers::url('/product/detail/consultform', array('product_id' => $productId))));
|
601
|
break;
|
603
|
break;
|
602
|
}
|
604
|
}
|
603
|
|
605
|
|
|
@@ -616,9 +618,10 @@ class DetailModel |
|
@@ -616,9 +618,10 @@ class DetailModel |
616
|
*
|
618
|
*
|
617
|
* @param int $uid 用户ID
|
619
|
* @param int $uid 用户ID
|
618
|
* @param int $id 咨询ID
|
620
|
* @param int $id 咨询ID
|
|
|
621
|
+ * @param int $productId 商品ID
|
619
|
* @return array
|
622
|
* @return array
|
620
|
*/
|
623
|
*/
|
621
|
- public static function usefulConsult($uid, $id)
|
624
|
+ public static function usefulConsult($uid, $id, $productId)
|
622
|
{
|
625
|
{
|
623
|
$result = array('code' => 400, 'message' => '出错啦~');
|
626
|
$result = array('code' => 400, 'message' => '出错啦~');
|
624
|
|
627
|
|
|
@@ -628,6 +631,7 @@ class DetailModel |
|
@@ -628,6 +631,7 @@ class DetailModel |
628
|
if (empty($uid)) {
|
631
|
if (empty($uid)) {
|
629
|
$result['code'] = 401;
|
632
|
$result['code'] = 401;
|
630
|
$result['message'] = '用户id为空';
|
633
|
$result['message'] = '用户id为空';
|
|
|
634
|
+ $result['data'] = Helpers::url('/signin.html', array('refer' => Helpers::url('/product/detail/consultform', array('product_id' => $productId))));
|
631
|
break;
|
635
|
break;
|
632
|
}
|
636
|
}
|
633
|
|
637
|
|