|
@@ -16,15 +16,18 @@
|
|
|
<script type="text/javascript">
|
|
|
$(function ()
|
|
|
{
|
|
|
+ var sign_url = "http://p.lrlz.com/mobile/index.php?act=mshop&op=test&client_type=wap";
|
|
|
+ sign_url = encodeURIComponent(sign_url);
|
|
|
$.ajax({
|
|
|
type: "get",
|
|
|
async: false,
|
|
|
- url: "http://"+ window.location.host +"/mobile/index.php?act=mshop&op=signurl&client_type=ajax",
|
|
|
+ url: "http://"+ window.location.host +"/mobile/index.php?act=mshop&op=signurl&client_type=ajax&sign_url=" + sign_url,
|
|
|
dataType: "jsonp",
|
|
|
jsonp: "callback",//传递给请求处理程序或页面的,用以获得jsonp回调函数名的参数名(一般默认为:callback)
|
|
|
success: function (json) {
|
|
|
console.log(json);
|
|
|
var jsonx = json.datas;
|
|
|
+
|
|
|
var timestamp = jsonx.timestamp,
|
|
|
nonceStr = jsonx.noncestr,
|
|
|
signature = jsonx.signature,
|
|
@@ -81,8 +84,8 @@
|
|
|
wx.onMenuShareAppMessage({
|
|
|
title: "分享测试", // 分享标
|
|
|
desc: "分享测试分享测试",
|
|
|
- link: "http://www.baidu.com", //cookie读取
|
|
|
- imgUrl: "http://pic.58pic.com/58pic/14/27/45/71r58PICmDM_1024.jpg",// 分享图标
|
|
|
+ link: "http://p.lrlz.com/mobile/index.php?act=mshop&op=test&client_type=wap", //cookie读取
|
|
|
+ imgUrl: "http://p.lrlz.com/data/upload/shop/store/goods/6/6_05511819175096982_360.jpg",// 分享图标
|
|
|
trigger: function (res) {
|
|
|
// 不要尝试在trigger中使用ajax异步请求修改本次分享的内容,因为客户端分享操作是一个同步操作,这时候使用ajax的回包会还没有返回
|
|
|
},
|