You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- <?php
- /**
- * 微信推送时 调用指定方法
- * ============================================================================
- * * 版权所有 运游通 * *
- * 网站地址: http://www.zhizhuchuxing.com
- * ----------------------------------------------------------------------------
- * 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
- * 使用;不允许对程序代码以任何形式任何目的的再发布。
- * ============================================================================
- * Author By: 倪宗锋
- * PhpStorm WxDoFunction.php
- * Create By 2017/1/5 11:37 $
- */
-
-
- namespace common\config\wechatConfig;
-
-
- use common\models\FxUserOpenid;
-
- class WxDoFunction
- {
-
- /**
- * Des:扫一扫数处理
- * Name: scan
- * @param $content
- * @return bool|string
- * @author 倪宗锋
- */
- public function scan($content)
- {
- if (empty($content['FromUserName'])) {
- return false;
- }
-
- $from_qrcode_id = 0;
- if (!empty($content['EventKey'])) {
- $from_qrcode_id = (int)$content['EventKey'];
- }
- $openid = $content['FromUserName'];
- $userTab = new FxUserOpenid();
- if ($from_qrcode_id > 50000 && $from_qrcode_id < 100000) {//如果是分销用户则网分销用户的数据库添加数据
- $userTab->editFxWeChatFxUid($openid, $from_qrcode_id);
- }
- return '';
-
- }
-
- /**
- * Des:特殊字符串做处理
- * Name: updateUser
- * @param $openid
- * @return string
- * @author 倪宗锋
- */
- public function showOrderInfo($word)
- {
- if (is_numeric($word)) {
- if (strlen($word) == 6 || strlen($word) == 7) {
- $wx_interface = new WxInterfaceModel();
- $result = $wx_interface->sendOrderInfo($word);
- if ($result['flag']) {//有所查订单
-
- if ($result['data']['send_bus_res_id'] > 0) {//是否派车
- $bus_no = $result['data']['bus_no'];
- $driver_name = $result['data']['driver_name'];
- $driver_mobile = $result['data']['driver_mobile'];
- $msgSend = "车牌号:{$bus_no} 司机姓名:{$driver_name} 司机手机:{$driver_mobile}";
- $msgSend .= "司机到站会主动联系未到的乘客,不会遗漏客人;请不要随意拨打司机电话,否则会影响司机休息和行车安全。";
- } else {
- $msgSend = '您乘坐的车辆暂未派车,请在发车前一个小时回复订单号获取信息';
- }
- } else {
- $msgSend = '';
- }
-
- } else {
- $msgSend = '';
- }
- } else {
- $msgSend = '';
- }
- return $msgSend;
- }
- }
|