作者 王晓刚
1 个管道 的构建 通过 耗费 1 秒

视频详情

... ... @@ -118,7 +118,7 @@ class Goods extends WechatBase
];
$app = new Application($options);
$js = $app->js;
$jssdk = $js->config(['getLocation'], $debug = true, $beta = false, $json = true);
$jssdk = $js->config(['getLocation'], $debug = false, $beta = false, $json = true);
$this->assign('jssdk',$jssdk);
if($data['type'] == 1){
return $this->fetch('video_detail');
... ...
... ... @@ -149,19 +149,6 @@
{include file="public/js" /}
<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
<script>
wx.config(
{$jssdk}
);
wx.ready(function () {
wx.getLocation({
success: function (res) {
alert(JSON.stringify(res));
},
cancel: function (res) {
alert('用户拒绝授权获取地理位置');
}
});
});
$(function(){
//全局变量
var goods_id = "{$data.id}";//用户id
... ... @@ -175,7 +162,19 @@
var lat = '';
var lng = '';
//定位当前位置
wx.config(
{$jssdk}
);
wx.ready(function () {
wx.getLocation({
success: function (res) {
alert(JSON.stringify(res));
},
cancel: function (res) {
alert('必须同意授权获取地理位置才能获得奖励哦');
}
});
});
// var geolocation = new qq.maps.Geolocation("JMPBZ-DV7WU-WT4V7-BYCU2-XG3E5-OZB7T", "广告公众号");
// var positionNum = 0;
// var options = {
... ...