|
@@ -0,0 +1,37 @@
|
|
|
+<?php namespace App\Http\Controllers\Api;
|
|
|
+
|
|
|
+use App\Http\Controllers\Api\Api;
|
|
|
+use App\Models\Custom as Custom;
|
|
|
+use App\Models\WeiBan\Qrcode as Model;
|
|
|
+
|
|
|
+/**
|
|
|
+ *微伴客服
|
|
|
+ *
|
|
|
+ * @author 刘相欣
|
|
|
+ *
|
|
|
+ * */
|
|
|
+class WeiBanQrcode extends Api{
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取客服二维码 /api/weiban_qrcode/get_qrcode
|
|
|
+ *
|
|
|
+ *
|
|
|
+ * */
|
|
|
+ public function get_qrcode(Model $Model,Custom $Custom){
|
|
|
+ // 接口验签
|
|
|
+ // $this->verify_sign();
|
|
|
+ // 检查登录
|
|
|
+ $uid = $this->checkLogin();
|
|
|
+ // 查询用户
|
|
|
+ $custom = $Custom->getOne($uid);
|
|
|
+ // 用户不存在
|
|
|
+ if( empty($custom) ) return json_send(['code'=>'error','msg'=>'用户不存在','data'=>['error'=>'用户不存在']]);
|
|
|
+ // 如果没有关联企微,获取二维码,已关联的不验证
|
|
|
+ $followQrcode = $Model->getFollowQrcode($custom['city_id']);
|
|
|
+ // 返回结果
|
|
|
+ return json_send(['code'=>'success','msg'=>'获取成功','data'=>['follow_qrcode'=>$followQrcode]]);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+}
|