|
|
@@ -6,15 +6,17 @@
|
|
|
<template>
|
|
|
<div class="app-content">
|
|
|
<button type="default" open-type="share">点击分享</button>
|
|
|
- 参数展示:{{JSON.stringify(shareInfo)}}
|
|
|
+ 参数展示:{{JSON.stringify(shareInfo.shopId)}}
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
+import { ghsInfo } from "@/api/ghs/index";
|
|
|
export default {
|
|
|
name: 'Share',
|
|
|
data () {
|
|
|
return {
|
|
|
shareInfo:'',
|
|
|
+ title: ''
|
|
|
}
|
|
|
},
|
|
|
onShareAppMessage(res) {
|
|
|
@@ -23,14 +25,21 @@ export default {
|
|
|
console.log(res.target)
|
|
|
}
|
|
|
return {
|
|
|
- title: '自定义分享标题',
|
|
|
- path: `/pagesPurchase/ghsProduct?shopId=${shopId}&id=${id}&name=${name}`
|
|
|
+ title: this.title,
|
|
|
+ path: `/pagesPurchase/ghsProduct?shopId=${shareInfo.shopId}&id=${shareInfo.id}&name=${shareInfo.name}`
|
|
|
}
|
|
|
},
|
|
|
onLoad () {
|
|
|
if(uni.getStorageSync('extraData')){
|
|
|
this.shareInfo = uni.getStorageSync('extraData').referrerInfo.extraData;
|
|
|
}
|
|
|
+ ghsInfo({shopId: this.shareInfo.shopId}).then(res => {
|
|
|
+ console.log(res)
|
|
|
+ uni.setNavigationBarTitle({
|
|
|
+ title:res.data.name
|
|
|
+ })
|
|
|
+ this.title = res.data.name
|
|
|
+ }).catch(err => {console.log(err)})
|
|
|
},
|
|
|
methods: {
|
|
|
}
|