From 2d3d1efeaac179058d9e7a3e82dd45d41d966510 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Tue, 10 Sep 2019 17:01:03 +0800 Subject: [PATCH] path --- public/react/src/App.js | 2 +- public/react/src/common/util/ShareUtil.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/public/react/src/App.js b/public/react/src/App.js index 194d8f22f..1a4aedc05 100644 --- a/public/react/src/App.js +++ b/public/react/src/App.js @@ -326,7 +326,7 @@ class App extends Component { }); wx.ready(function () { console.log('wx is ready') - configShareForIndex() + configShareForIndex('/') }); wx.error(function (res) { console.log('wx is error') diff --git a/public/react/src/common/util/ShareUtil.js b/public/react/src/common/util/ShareUtil.js index 845297899..24fffbf15 100644 --- a/public/react/src/common/util/ShareUtil.js +++ b/public/react/src/common/util/ShareUtil.js @@ -19,12 +19,12 @@ function share(shareData) { 单个课程和实训 获取课程/实训的简介 该课程或者实训展示的缩略图 */ -export function configShareForIndex () { +export function configShareForIndex (path) { if (!wx) return; var shareData = { title: 'EduCoder - 首页', desc: 'Educoder是一个面向计算机类的互联网IT教育和实战平台,提供企业级工程实训,以实现工程化专业教学的自动化和智能化。高校和企业人员可以在此开展计算机实践性教学活动,将传统的知识传授和时兴的工程实战一体化。', - link: host, + link: host + (path || ''), imgUrl: window.__testImageUrl || host + '/react/build/images/share_logo_icon.jpg' };