提交 a1e2906e 编写于 作者: guofeng.chen's avatar guofeng.chen

修改分享

上级 61a22c4a
...@@ -83,8 +83,12 @@ const user = { ...@@ -83,8 +83,12 @@ const user = {
getWxUserInfo({ state, commit }, code) { getWxUserInfo({ state, commit }, code) {
commit('SET_WX_CODE', code); commit('SET_WX_CODE', code);
const type = getWxType(); const type = getWxType();
// let url = getBaseUrl(`wechats/users/info/${type}/${code}`); let url = '';
let url = `https://sc.yunqueyi.com/wechats/users/info/${type}/${code}`; // 测试支付,暂时使用线上 if (type == 30) {
url = getBaseUrl(`wechats/users/info/${type}/${code}`);
} else {
url = `https://sc.yunqueyi.com/wechats/users/info/${type}/${code}`; // 测试支付,暂时使用线上
}
fetch({ fetch({
url, url,
method: 'get', method: 'get',
......
...@@ -4,12 +4,12 @@ import request from '@/utils/fetch'; ...@@ -4,12 +4,12 @@ import request from '@/utils/fetch';
import wx from 'weixin-js-sdk' import wx from 'weixin-js-sdk'
import { getBaseUrl, getWxType } from "@/utils/index"; import { getBaseUrl, getWxType } from "@/utils/index";
/** 注入配置信息 */ /** 注入配置信息 */
export const wxConfig = (link) => { export const wxConfig = () => {
// const params = { resetURI: true, url: encodeURIComponent(location.href) }; // const params = { resetURI: true, url: encodeURIComponent(location.href) };
// 上线前是需要把域名改为线上的sc // 上线前是需要把域名改为线上的sc
let baseUrl = getBaseUrl(""); let baseUrl = getBaseUrl("");
let type = '&type=' + getWxType(); // type不同,对应的appid不一样,15为线上 let type = '&type=' + getWxType(); // type不同,对应的appid不一样,15为线上
request({ url: `https://sc.yunqueyi.com/wechats/signs?url=${encodeURIComponent(link)}${type}` }).then(res => { request({ url: `https://sc.yunqueyi.com/wechats/signs?url=${encodeURIComponent(location.href)}${type}` }).then(res => {
// request({ url: `${baseUrl}/wechats/signs?url=${encodeURIComponent(link)}` }).then(res => { // request({ url: `${baseUrl}/wechats/signs?url=${encodeURIComponent(link)}` }).then(res => {
let configs = res.data.signMap; let configs = res.data.signMap;
wx.config({ wx.config({
...@@ -115,7 +115,7 @@ export const wechatShare = (option = {}, successCB = () => {}, hideMenu) => { ...@@ -115,7 +115,7 @@ export const wechatShare = (option = {}, successCB = () => {}, hideMenu) => {
...option ...option
}; };
wxConfig(shareOption.link); wxConfig();
if (hideMenu) { if (hideMenu) {
wxHideMenu() wxHideMenu()
} else { } else {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册