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

Commit

Permalink
fix: 去除debug, 修正分享需要的图片和文字内容
Browse files Browse the repository at this point in the history
  • Loading branch information
boxshadow committed Apr 21, 2018
1 parent 6939a36 commit 27dbe13
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/page/news/newsDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,15 @@ export default {
};
},
computed: {
firstImage() {
let images = this.image;
if (!Object.keys(images).length) {
return "";
}
return (
this.$http.defaults.baseURL + "/files/" + images.id + "?w=300&h=300"
);
},
newsID() {
return this.$route.params.newsID;
},
Expand Down Expand Up @@ -177,6 +186,8 @@ export default {
.then(({ data = {} }) => {
this.news = data;
this.oldID = this.newsID;
this.share.title = data.title;
this.share.desc = data.subject;
setTimeout(() => {
this.loading = false;
this.fetching = false;
Expand Down Expand Up @@ -205,7 +216,7 @@ export default {
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 Expand Up @@ -256,7 +267,7 @@ export default {
} else {
this.$Message.success("请使用微信自带分享😳");
Wx.config({
debug: true,
debug: false,
appId: this.config.appid,
timestamp: this.config.timestamp,
signature: this.config.signature,
Expand Down

0 comments on commit 27dbe13

Please sign in to comment.