|
@@ -29,46 +29,8 @@ export default {
|
|
|
let obj = this;
|
|
|
details({}, this.idd).then((res) => {
|
|
|
obj.content = res.data.content;
|
|
|
- console.log(res);
|
|
|
- let mess = {
|
|
|
- title: "荆州市红十字会",
|
|
|
- link: window.location.href, // 分享链接
|
|
|
- imgUrl: "http://jzswx.jzrc.org.cn/index/static/img/002.png", // 分享图标
|
|
|
- desc: res.data.title,
|
|
|
- success: function () {
|
|
|
- console.log(" 成功调用分享");
|
|
|
- },
|
|
|
- fail: function (e) {
|
|
|
- console.log(e);
|
|
|
- },
|
|
|
- };
|
|
|
- wx.checkJsApi({
|
|
|
- jsApiList: ["updateAppMessageShareData"],
|
|
|
- success: function (res) {
|
|
|
- console.log(res,'校驗結果')
|
|
|
- },
|
|
|
- });
|
|
|
- wechatConfig({
|
|
|
- // url: 'pages/applic/location',
|
|
|
- url: 'http://jzsred.jzrc.org.cn',
|
|
|
- }).then(res => {
|
|
|
- console.log(res)
|
|
|
- })
|
|
|
- wx.config({
|
|
|
- debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
|
|
|
- appId: data.appId, // 必填,企业号的唯一标识,此处填写企业号corpid
|
|
|
- timestamp: data.timestamp, // 必填,生成签名的时间戳
|
|
|
- nonceStr: data.nonceStr, // 必填,生成签名的随机串
|
|
|
- signature: data.signature, // 必填,签名,见附录1
|
|
|
- jsApiList: data.jsApiList // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
|
|
|
- });
|
|
|
- console.log(mess);
|
|
|
- // wx.updateAppMessageShareData(mess);
|
|
|
- wx.onMenuShareAppMessage(mess); // 即将废弃
|
|
|
- // 分享朋友圈
|
|
|
- // wx.updateTimelineShareData(mess);
|
|
|
- wx.onMenuShareTimeline(mess); // 即将废弃
|
|
|
- });
|
|
|
+})
|
|
|
+
|
|
|
},
|
|
|
},
|
|
|
};
|