Commit b5c21698 authored by 郭志伟's avatar 郭志伟

fix: 分享调试

parent becf339b
import { setShare } from "@/service/wxJsSdk"; import { setShare } from "@/service/wxJsSdk";
const currentOrigin = window.location.origin; const currentOrigin = window.location.origin + "?share=";
const logo = currentOrigin + "/shareImg/index.png"; const logo = currentOrigin + "/shareImg/index.png";
const shareList = { const shareList = {
home: { home: {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Description: weixin-js-sdk * @Description: weixin-js-sdk
* @LastEditors: gzw * @LastEditors: gzw
* @Date: 20120-08-30 18:40:11 * @Date: 20120-08-30 18:40:11
* @LastEditTime: 2020-09-01 19:27:35 * @LastEditTime: 2020-09-01 19:40:04
*/ */
import cfg from "@/config/index"; import cfg from "@/config/index";
import { getwxAuth } from "@/api/user"; import { getwxAuth } from "@/api/user";
...@@ -17,7 +17,7 @@ import localStorage from "@/service/localStorage"; ...@@ -17,7 +17,7 @@ import localStorage from "@/service/localStorage";
export async function setShare({ export async function setShare({
title = "", title = "",
desc = "", desc = "",
link = window.location.href, link = window.location.origin,
imgUrl = "" imgUrl = ""
}) { }) {
// console.log(title, desc, link, imgUrl); // console.log(title, desc, link, imgUrl);
......
...@@ -153,6 +153,13 @@ export default { ...@@ -153,6 +153,13 @@ export default {
computed: { computed: {
...mapState(["isShowLogin"]) ...mapState(["isShowLogin"])
}, },
created() {
let _path = this.$route.query;
if (_path) {
_path = "/" + decodeURIComponent(_path);
this.$router.replace(_path);
}
},
async mounted() { async mounted() {
this.getList(); this.getList();
if (this.mongoToken) { if (this.mongoToken) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment