Skip to content
This repository has been archived by the owner on Nov 15, 2018. It is now read-only.

Commit

Permalink
fix: 获取base_url错误
Browse files Browse the repository at this point in the history
  • Loading branch information
boxshadow committed Apr 11, 2018
1 parent b629577 commit 1cc98f3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/page/UserHome.vue
Original file line number Diff line number Diff line change
Expand Up @@ -339,15 +339,17 @@ export default {
// 微信内分享
getWeChatConfig() {
const url =
window.location.origin + process.env.BASE_URL + this.$route.fullPath;
window.location.origin +
process.env.BASE_URL.substr(0, process.env.BASE_URL.length - 1) +
this.$route.fullPath;
if (this.config.appid === "") {
wx.getOauth(url).then(res => {
this.config.timestamp = res.timestamp || "";
this.config.signature = res.signature || "";
this.config.appid = res.appid || "";
this.config.noncestr = res.noncestr || "";
Wx.config({
debug: true,
debug: false,
appId: this.config.appid,
timestamp: this.config.timestamp,
signature: this.config.signature,
Expand Down
5 changes: 3 additions & 2 deletions src/page/feed/feedDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,6 @@ export default {
params: { limit: 10 }
})
.then(({ data = [] }) => {
console.log(data);
this.rewardList = data;
});
},
Expand Down Expand Up @@ -390,7 +389,9 @@ export default {
},
getWeChatConfig() {
const url =
window.location.origin + process.env.BASE_URL + this.$route.fullPath;
window.location.origin +
process.env.BASE_URL.substr(0, process.env.BASE_URL.length - 1) +
this.$route.fullPath;
this.share.link = url;
if (this.config.appid === "") {
wx.getOauth(url).then(res => {
Expand Down

0 comments on commit 1cc98f3

Please sign in to comment.