|
@@ -12,7 +12,9 @@ import $http from "./uview-ui/libs/request"
|
|
|
const href = location.href.split('#')[0];
|
|
|
// const href = location.href.split("?")[0]
|
|
|
|
|
|
-import { config } from '@/common/config'
|
|
|
+import {
|
|
|
+ config
|
|
|
+} from '@/common/config'
|
|
|
|
|
|
//系统域名url
|
|
|
export default {
|
|
@@ -60,7 +62,9 @@ export default {
|
|
|
"chooseCard",
|
|
|
"openCard"
|
|
|
],
|
|
|
- ...(await $http.get(url,{url:href})).data,
|
|
|
+ ...(await $http.get(url, {
|
|
|
+ url: href
|
|
|
+ })).data,
|
|
|
// ...(await uni.request(url,{url:href})).retBody,
|
|
|
});
|
|
|
wx.ready(e => {
|
|
@@ -74,15 +78,15 @@ export default {
|
|
|
},
|
|
|
hideMenu() {
|
|
|
wx.hideAllNonBaseMenuItem();
|
|
|
- wx.hideMenuItems({
|
|
|
- menuList: [
|
|
|
+ wx.hideMenuItems({
|
|
|
+ menuList: [
|
|
|
"menuItem:share:appMessage",
|
|
|
"menuItem:profile",
|
|
|
"menuItem:addContact",
|
|
|
"menuItem:dayMode",
|
|
|
"menuItem:nightMode",
|
|
|
"menuItem:share:timeline",
|
|
|
- "menuItem:favorite"
|
|
|
+ "menuItem:favorite"
|
|
|
] // 要隐藏的菜单项,只能隐藏“传播类”和“保护类”按钮,所有menu项见附录3
|
|
|
});
|
|
|
},
|
|
@@ -113,12 +117,13 @@ export default {
|
|
|
// search.push(`${key}=${value}`);
|
|
|
// }
|
|
|
// search = "?" + search.join("&");
|
|
|
-
|
|
|
+
|
|
|
let afterEndUrl = config.afterEndUrl;
|
|
|
// let afterEndUrl = 'http://tanhui.hongweisoft.com/api/wechat/h5/authorize?returnUrl='
|
|
|
// let afterEndUrl = 'http://gzhjt.gzsdzth.com/api/wechat/h5/authorize?returnUrl='
|
|
|
-
|
|
|
- let fullUrl = afterEndUrl + location.href.split('?')[0] + '?togetherId=' + data.togetherId + '/#/' + data.routeUrl
|
|
|
+
|
|
|
+ let fullUrl = afterEndUrl + location.href.split('?')[0] + '?togetherId=' + data.togetherId + '/#/' + data
|
|
|
+ .routeUrl
|
|
|
const shareInfo = {
|
|
|
title: data.nickname + '邀请你参与贵州省单株碳汇精准扶贫',
|
|
|
link: fullUrl,
|
|
@@ -130,7 +135,7 @@ export default {
|
|
|
fail(res) {},
|
|
|
...info
|
|
|
};
|
|
|
- console.log('shareInfo',shareInfo,'fullUrl',fullUrl)
|
|
|
+ console.log('shareInfo', shareInfo, 'fullUrl', fullUrl)
|
|
|
//自定义“分享给朋友”及“分享到QQ”按钮的分享内容(1.4.0)
|
|
|
wx.updateAppMessageShareData(shareInfo);
|
|
|
//自定义“分享到朋友圈”及“分享到QQ空间”按钮的分享内容(1.4.0)
|
|
@@ -140,12 +145,13 @@ export default {
|
|
|
JSAPI(res, jumpUrl) {
|
|
|
return new Promise(r => {
|
|
|
wx.chooseWXPay({
|
|
|
- "timestamp": res.timeStamp, //时间戳,自1970年以来的秒数
|
|
|
+ "appId": res.appId,
|
|
|
+ "timeStamp": res.timeStamp, //时间戳,自1970年以来的秒数
|
|
|
"nonceStr": res.nonceStr, //随机串
|
|
|
"package": res.packageValue,
|
|
|
"signType": res.signType, //微信签名方式:
|
|
|
"paySign": res.paySign, //微信签名
|
|
|
- success() {
|
|
|
+ success(data) {
|
|
|
r({
|
|
|
code: 0,
|
|
|
msg: "成功"
|