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

修改分享

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