Ejemplo n.º 1
0
 public function about()
 {
     /****分享与定位***/
     $wxm = new WxUserInfo();
     $signPackage = $wxm->getSignPackage();
     $this->assign('signPackage', $signPackage);
     $this->display();
 }
Ejemplo n.º 2
0
 public function index()
 {
     $map['ptype'] = 3;
     $list = M('problem')->where($map)->order('pid')->select();
     $this->list = $list;
     $this->assign('title', '了解壹易购物');
     /****分享与定位***/
     $wxm = new WxUserInfo();
     $signPackage = $wxm->getSignPackage();
     $this->assign('signPackage', $signPackage);
     $this->display();
 }
Ejemplo n.º 3
0
 public function getsharekey()
 {
     $wxm = new WxUserInfo();
     $signPackage = $wxm->getSignPackage();
     $this->ajaxReturn($signPackage, 'JSON');
 }
Ejemplo n.º 4
0
 public function yaoqingmain()
 {
     /****分享与定位***/
     $wxm = new WxUserInfo();
     $signPackage = $wxm->getSignPackage();
     $this->assign('signPackage', $signPackage);
     $this->assign('title', '邀请好友');
     $this->assign('uid', session("_uid"));
     $this->display();
 }
Ejemplo n.º 5
0
 public function menudel()
 {
     vendor('Weixinpay.WxPayJsApiPay');
     $appid = \WxPayConfig::APPID;
     $appsecret = \WxPayConfig::APPSECRET;
     $wxmsg = new WxUserInfo();
     $access_token = $wxmsg->accessToken();
     $Auth = new WechatAuth($appid, $appsecret, $access_token);
     $rs = $Auth->menuDelete();
     print_r($rs);
 }
Ejemplo n.º 6
0
    public function KJNotify($username, $openid, $mobile, $goodsname)
    {
        $wxm = new WxUserInfo();
        $ACCESS_TOKEN = $wxm->accessToken();
        $url = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token={$ACCESS_TOKEN}";
        $json = '
{
	"touser":"******",
	"template_id":"Qsa596C8aYhg5zTeYnoVp8F83WrlHIYziiHbcSnjv3Y",
	"url":"http://yiyigw.cn/index.php/Home",
	"topcolor":"#FF0000",
	"data":{
		"first": {
			"value":"恭喜你参与的砍价活动完成!",
			"color":"#173177"
		},
		"keyword1":{
			"value":"' . $username . '",
			"color":"#173177"
		},
		"keyword2":{
			"value":"' . $mobile . '",
			"color":"#173177"
		},
		"keyword3":{
			"value":"",
			"color":"#173177"
		},
		"keyword4":{
			"value":"",
			"color":"#173177"
		},
		"keyword5":{
			"value":"' . $goodsname . '",
			"color":"#173177"
		},		
		"remark":{
			"value":"恭喜您获得:' . $goodsname . ',系统将于48小时内自动发放奖品。",
			"color":"#173177"
		}
	}
}
		';
        $result = $this->postData($url, $json);
        return $result;
    }
Ejemplo n.º 7
0
 public function create_qr($openid = '', $type, $dotype = '1001')
 {
     //找到此用户的uid
     $uid = M('member')->where(array('openid' => $openid))->limit(1)->getField('uid');
     $uid = $dotype . $type . $uid;
     //https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token=TOKEN
     //{"expire_seconds": 604800, "action_name": "QR_SCENE", "action_info": {"scene": {"scene_id": 123}}}
     $param = array('expire_seconds' => 2592000, 'action_name' => 'QR_LIMIT_STR_SCENE', 'action_info' => array('scene' => array('scene_str' => $uid)));
     $param = json_encode($param);
     $wxmsg = new WxUserInfo();
     $access_token = $wxmsg->accessToken();
     $rs = post('https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token=' . $access_token, $param);
     $rs = json_decode($rs);
     //处理object
     $rs = object_array($rs);
     return 'https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=' . $rs['ticket'];
 }
Ejemplo n.º 8
0
 public function create_fqrforreg()
 {
     $dotype = '777800';
     $uid = $dotype;
     $param = array('expire_seconds' => 2592000, 'action_name' => 'QR_SCENE', 'action_info' => array('scene' => array('scene_id' => $uid)));
     $param = json_encode($param);
     $wxmsg = new WxUserInfo();
     $access_token = $wxmsg->accessToken();
     $rs = post('https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token=' . $access_token, $param);
     $rs = json_decode($rs);
     //处理object
     $rs = object_array($rs);
     header('location:https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=' . $rs['ticket']);
 }