<?php
/**
* 企业小程序模块小程序接口定义
*
* @author 易福网
* @url http://www.efwww.com/
*/
defined('IN_IA') or exit('Access Denied');
class Weixinmao_zpModuleWxapp extends WeModuleWxapp {
public function doPageGetbanner()
{
global $_GPC, $_W;
//$siteurl = $this->GetSiteUrl();
$list = pdo_fetchall("SELECT * FROM " . tablename('weixinmao_zp_adv') ."WHERE enabled =1 AND weid=:weid ORDER BY displayorder DESC ",array(":weid" => $_W['uniacid']));
if($list)
{
foreach($list as $k=>$v)
{
$list[$k]['thumb'] = tomedia($v['thumb']);
}
}
return $this->result(0, 'success', $list);
}
public function doPageGetphone()
{
global $_GPC, $_W;
include "inc/wxBizDataCrypt.php";
//var_dump($is);
// $code = $_GET['code'];
$iv = $_GPC['iv'];
$encryptedData = $_GPC['encryptedData'];
$appid = $_W['uniaccount']['key'];;//小程序唯一标识 (在微信小程序管理后台获取)
$appsecret = $_W['uniaccount']['secret'];//小程序的 app secret (在微信小程序管理后台获取)
// $grant_type = "authorization_code"; //授权(必填)
// $params = "appid=".$appid."&secret=".$appsecret."&js_code=".$code."&grant_type=".$grant_type;
// $url = "https://api.weixin.qq.com/sns/jscode2session?".$params;
// $res = json_decode($this->httpGet($url),true);
//json_decode不加参数true,转成的就不是array,而是对象。 下面的的取值会报错 Fatal error: Cannot use object of type stdClass as array in
// $sessionKey = $res['session_key'];//取出json里对应的值
//echo $_SESSION['session_key'];
$pc = new WXBizDataCrypt($appid, $_SESSION['session_key']);
// var_dump($pc);
// echo $encryptedData, $iv;
$errCode = $pc->decryptData($encryptedData, $iv, $data);
$obj = json_decode($data);
var_dump($obj);
$uid = $_GPC['uid'];
$tel = $obj->phoneNumber;
// echo $tel;
pdo_update('weixinmao_zp_userinfo',array('tel'=>$tel),array('uid'=>$uid));
return $this->result(0, 'success', array());
}
public function doPageIntro()
{
global $_GPC, $_W;
//$siteurl = $this->GetSiteUrl();
$list = pdo_fetch("SELECT * FROM " . tablename('weixinmao_zp_intro')." WHERE uniacid=:uniacid",array(":uniacid" => $_W['uniacid']));
$list['logo'] = tomedia($list['logo']);
$list['description']=html_entity_decode($list['content']);
$list['content'] = trim(html_entity_decode(strip_tags($list['content'])),chr(0xc2).chr(0xa0));
$map = $this->Convert_BD09_To_GCJ02($list['lat'],$list['lng']);
$list['lat'] = $map['lat'];
$list['lng'] = $map['lng'];
return $this->result(0, 'success', $list);
}
public function doPageRegister()
{
global $_GPC, $_W;
$uid = $_GPC['uid'];
$tel = $_GPC['phone'];
$code = $_GPC['code'];
$is_code = pdo_fetch("SELECT id FROM " . tablename('weixinmao_wy_mobile_verify_code') ." WHERE uniacid=:uniacid AND verify_code=:code AND mobile=".$tel,array(":uniacid" => $_W['uniacid'],':code'=>$code));
if(!$is_code)
{
$list = array('msg'=>'验证码错误','error'=>1);
return $this->result(0, 'success', $list);
}
$is_user = pdo_fetch("SELECT id FROM " . tablename('weixinmao_wy_userinfo') ." WHERE uniacid=:uniacid AND uid=:uid ",array(":uniacid" => $_W['uniacid'],':uid'=>$uid));
if($is_user)
{
$list = array('msg'=>'您已认证过手机号','error'=>1);
return $this->result(0, 'success', $list);
}
$userinfodata = array(
'uniacid' => $_W['uniacid'],
'uid'=>$uid,
'tel' => $tel,
'createtime' => TIMESTAMP
);
pdo_insert('weixinmao_wy_userinfo', $userinfodata);
$id = pdo_insertid();
$list = array('msg'=>'认证成功','error'=>0);
return $this->result(0, 'success', $list);
}
public function doPageSendsms()
{
global $_GPC, $_W;
$phone = $_GPC['phone'];
$is_user = pdo_fetch("SELECT id,tel FROM " . tablename('weixinmao_zp_userinfo') ." WHERE uniacid=:weid AND tel=".$phone,array(":weid" => $_W['uniacid']));
if($is_user)
return $this->result(0, 'success', array('msg'=>'手机号已经存在','error'=>1));
$statusStr = array(
"0" => 'success',
"-1" => "参数不全",
"-2" => "服务器空间不支持,请确认支持curl或者fsocket,联系您的空间商解决或者更换空间!",
"30" => "密码错误",
"40" => "账号不存在",
"41" => "余额不足",
"42" => "帐户已过期",
"43" => "IP地址限制",
"50" => "内容含有敏感词"
);
$intro = pdo_fetch("SELECT smsaccount,smspwd FROM " . tablename('weixinmao_zp_intro')." WHERE uniacid=:uniacid",array(":uniacid" => $_W['uniacid']));
$smsapi = "http://www.smsbao.com/"; //短信网关
$user = $intro['smsaccount']; //短信平台帐号
$pass = md5($intro['smspwd']); //短信平台密码
$code = rand(100000,999999);
$content="验证码为:".$code;//要发送的短信内容
$sendurl = $smsapi."sms?u=".$user."&p=".$pass."&m=".$phone."&c=".urlencode($content);
$result =file_get_contents($sendurl) ;
if( $statusStr[$result]=='success')
{
//$data = array( 'mobile'=>$phone,'create_time'=>time(),'verify_code'=>$code);
//$is_exist = M("mobile_verify_code")->where(array('mobile'=>$phone))->find();
$is_exist = pdo_fetch("SELECT id FROM " . tablename('weixinmao_zp_mobile_verify_code') ." WHERE uniacid=:weid AND phone=".$phone,array(":weid" => $_W['uniacid']));
if($is_exist)
{
$data = array(
'verify_code'=>$code,
'createtime' => TIMESTAMP,
);
pdo_update('weixinmao_zp_mobile_verify_code', $data, array('mobile' => $mobile,'uniacid'=>$_W['uniacid']));
}else{
$data = array(
'uniacid' => $_W['uniacid'],
'mobile'=>$phone,
'verify_code'=>$code,
'createtime' => TIMESTAMP,
);
pdo_insert('weixinmao_zp_mobile_verify_code', $data);
$id = pdo_insertid();
}
return $this->result(0, 'success', array('msg'=>'发送成功','error'=>0));
}else{
return $this->result(0, 'success', array('msg'=>'发送失败','error'=>1));
}
}
public function doPageGetshopmsg()
{
global $_GPC, $_W;
$companyid = intval($_GPC['companyid']);
$msglist = pdo_getall('weixinmao_zp_msgidlist',array('companyid'=>$companyid,'status'=>0));
$msgcount = count($msglist );
$data = array('msgcount'=>$msgcount);
return $this->result(0, 'success', $data);
}
public function doPageSaveshopmsg()
{
global $_GPC, $_W;
$uid = $_GPC['uid'];
$companyid = $_GPC['companyid'];
if(!$uid || $uid <=0 )
{
return $this->result(1, '用户未授权');
}
$msgdata = array(
'uniacid' => $_W['uniacid'],
'uid'=>$uid,
'companyid'=>$companyid,
'form_id' => $_GPC['form_id'],
'status'=>0,
'createtime' => TIMESTAMP
);
pdo_insert('weixinmao_zp_msgidlist', $msgdata);
$msglist = pdo_getall('weixinmao_zp_msgidlist',array('companyid'=>$companyid,'status'=>0));
$msgcount = count($msglist );
$list = array('msg'=>'提交成功','error'=>0,'msgcount'=>$msgcount);
return $this->result(0, 'success', $list);
}
public function doPageGetcitylist()
{
global $_GPC, $_W;
$condition_hot = " WHERE ishot = 1 AND uniacid=:uniacid ORDER BY sort DESC ";
$sql = 'SELECT id ,name FROM ' . tablename('weixinmao_zp_city') . $condition_hot ;
$hotlist = pdo_fetchall($sql,array(":uni
没有合适的资源?快使用搜索试试~ 我知道了~
求职招聘小程序源码
共596个文件
gif:136个
png:123个
js:88个
3星 · 超过75%的资源 需积分: 48 96 下载量 12 浏览量
2019-01-09
15:18:24
上传
评论 11
收藏 1.64MB ZIP 举报
温馨提示
求职招聘小程序源码求职招聘小程序 weixinmao_zp 4.0.30全开源版
资源推荐
资源详情
资源评论
收起资源包目录
求职招聘小程序源码 (596个子文件)
developer.cer 50B
style.css 10KB
photoswipe.css 3KB
uploadify_t.css 3KB
common.css 3KB
35.gif 13KB
42.gif 13KB
40.gif 10KB
18.gif 8KB
19.gif 8KB
11.gif 8KB
32.gif 7KB
49.gif 6KB
29.gif 6KB
97.gif 5KB
65.gif 5KB
31.gif 5KB
46.gif 5KB
57.gif 5KB
45.gif 5KB
08.gif 5KB
43.gif 4KB
33.gif 4KB
68.gif 4KB
26.gif 4KB
14.gif 4KB
07.gif 4KB
51.gif 4KB
10.gif 4KB
47.gif 4KB
72.gif 4KB
06.gif 3KB
94.gif 3KB
84.gif 3KB
41.gif 3KB
17.gif 3KB
09.gif 3KB
28.gif 3KB
photoswipe-loader.gif 3KB
50.gif 3KB
95.gif 3KB
22.gif 3KB
27.gif 3KB
67.gif 3KB
90.gif 3KB
60.gif 3KB
58.gif 3KB
74.gif 2KB
25.gif 2KB
101.gif 2KB
54.gif 2KB
99.gif 2KB
24.gif 2KB
12.gif 2KB
73.gif 2KB
104.gif 2KB
103.gif 2KB
34.gif 2KB
88.gif 2KB
53.gif 2KB
04.gif 2KB
23.gif 2KB
05.gif 2KB
21.gif 2KB
03.gif 2KB
00.gif 2KB
20.gif 2KB
02.gif 2KB
39.gif 2KB
96.gif 2KB
100.gif 2KB
30.gif 2KB
48.gif 2KB
13.gif 2KB
38.gif 2KB
98.gif 2KB
81.gif 2KB
83.gif 2KB
55.gif 2KB
01.gif 2KB
85.gif 2KB
44.gif 2KB
78.gif 2KB
15.gif 2KB
87.gif 2KB
82.gif 2KB
80.gif 2KB
59.gif 1KB
52.gif 1KB
86.gif 1KB
79.gif 1KB
102.gif 1KB
36.gif 1KB
16.gif 1KB
92.gif 1KB
105.gif 1KB
62.gif 1KB
75.gif 1KB
89.gif 1KB
76.gif 1KB
共 596 条
- 1
- 2
- 3
- 4
- 5
- 6
资源评论
- 游戏人间2019-04-28怎么安装呢? 好像没有对象服端程序.qq_200655652019-10-18这是微擎对应的模块
qq_20065565
- 粉丝: 7
- 资源: 10
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功