|
@@ -125,9 +125,17 @@
|
|
|
<script>
|
|
|
import { detail, getStudyAbout, goodsBuyStatistic } from '@/api/goods.js'
|
|
|
import { subscribe } from "@/api/study"
|
|
|
+import {
|
|
|
+ getShareInfo
|
|
|
+ } from '@/api/common.js'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ shareInfo:{
|
|
|
+ shareDescribe:'慧研学惠生活',
|
|
|
+ shareImg:'https://hyxhsh.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/XHBjBiMRhVYG8f1a30bbbd80c2346197b81470444c9a.png/1.png',
|
|
|
+ shareTitle:'慧研学惠生活',
|
|
|
+ },
|
|
|
pageLoading: false,
|
|
|
active: 0,
|
|
|
tab: 1,
|
|
@@ -397,9 +405,21 @@ export default {
|
|
|
uni.navigateTo({
|
|
|
url: '/share/index?goodsId=' + this.goodsId
|
|
|
});
|
|
|
+ },
|
|
|
+ getShareInfo(){
|
|
|
+ getShareInfo({id:1}).then(res=>{
|
|
|
+ if(res.state == 'Success'){
|
|
|
+ this.shareInfo = {
|
|
|
+ shareDescribe:res.content.shareDescribe,
|
|
|
+ shareImg:res.content.shareImg,
|
|
|
+ shareTitle:res.content.shareTitle,
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
onLoad(option) {
|
|
|
+ this.getShareInfo()
|
|
|
try {
|
|
|
this.shopInfo = JSON.parse(uni.getStorageSync('shopInfo'))
|
|
|
} catch (error) {
|
|
@@ -409,15 +429,25 @@ export default {
|
|
|
this.detail(option.id)
|
|
|
},
|
|
|
onShareTimeline() {
|
|
|
+ // return {
|
|
|
+ // title: "慧研学惠生活-" + this.info.goodsName,
|
|
|
+ // query: "id=" + this.id,
|
|
|
+ // };
|
|
|
return {
|
|
|
- title: "慧研学惠生活-" + this.info.goodsName,
|
|
|
- query: "id=" + this.id,
|
|
|
+ title: this.shareInfo.shareDescribe,
|
|
|
+ query: "id=1",
|
|
|
+ imageUrl: this.shareInfo.shareImg,
|
|
|
};
|
|
|
},
|
|
|
onShareAppMessage() {
|
|
|
+ // return {
|
|
|
+ // title: "慧研学惠生活-" + this.info.goodsName,
|
|
|
+ // path: "/study/studyGoodsDetail?id=" + this.id,
|
|
|
+ // };
|
|
|
return {
|
|
|
- title: "慧研学惠生活-" + this.info.goodsName,
|
|
|
- path: "/study/studyGoodsDetail?id=" + this.id,
|
|
|
+ title: this.shareInfo.shareDescribe,
|
|
|
+ path: "/study/studyGoodsDetail?id=" + this.id,
|
|
|
+ imageUrl: this.shareInfo.shareImg,
|
|
|
};
|
|
|
},
|
|
|
}
|